From 02e6ba91e887bd11146a57185b223582f56f3f09 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 30 Sep 2002 20:39:56 +0000 Subject: Vodz' last_patch57: Hi, Erik. my_getpw(uid/gid) and applets used it have problem: if username for uid not found, applets can`t detect it (but code pessent). Also "%8ld " format is bad: spaces not required (applets have self format or spec format (tar applet) and overflow for "id" applet...) This problem also pressent in stable version. Patch for unstable in attach. --w vodz --- coreutils/whoami.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'coreutils/whoami.c') diff --git a/coreutils/whoami.c b/coreutils/whoami.c index c3b1140e6..a9d6ecf26 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -35,8 +35,7 @@ extern int whoami_main(int argc, char **argv) if (argc > 1) show_usage(); - my_getpwuid(user, uid); - if (*user) { + if (my_getpwuid(user, uid)) { puts(user); return EXIT_SUCCESS; } -- cgit v1.2.3