aboutsummaryrefslogtreecommitdiff
path: root/coreutils/whoami.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-09-30 20:39:56 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-09-30 20:39:56 +0000
commit613d1366341793b382f63572d472016c1ad7b5a0 (patch)
treecc1954165fe7e6efed1ba0dfa7d5c3aea97fffa5 /coreutils/whoami.c
parentf41de5a7d48afe17882100c94eee4fd5a7016b5f (diff)
downloadbusybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.tar.gz
busybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.tar.bz2
busybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.zip
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 git-svn-id: svn://busybox.net/trunk/busybox@5613 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/whoami.c')
-rw-r--r--coreutils/whoami.c3
1 files changed, 1 insertions, 2 deletions
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)
35 if (argc > 1) 35 if (argc > 1)
36 show_usage(); 36 show_usage();
37 37
38 my_getpwuid(user, uid); 38 if (my_getpwuid(user, uid)) {
39 if (*user) {
40 puts(user); 39 puts(user);
41 return EXIT_SUCCESS; 40 return EXIT_SUCCESS;
42 } 41 }