diff options
Diffstat (limited to 'slstatus/components/user.c')
-rw-r--r-- | slstatus/components/user.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/slstatus/components/user.c b/slstatus/components/user.c deleted file mode 100644 index 71a0c9d..0000000 --- a/slstatus/components/user.c +++ /dev/null @@ -1,32 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include <pwd.h> -#include <stdio.h> -#include <sys/types.h> -#include <unistd.h> - -#include "../util.h" - -const char * -gid(void) -{ - return bprintf("%d", getgid()); -} - -const char * -username(void) -{ - struct passwd *pw; - - if (!(pw = getpwuid(geteuid()))) { - warn("getpwuid '%d':", geteuid()); - return NULL; - } - - return bprintf("%s", pw->pw_name); -} - -const char * -uid(void) -{ - return bprintf("%d", geteuid()); -} |