diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-13 10:43:21 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-13 10:43:21 +0000 |
commit | 2cfb3f4502c8d953858d390d1ccad6b7bc132b44 (patch) | |
tree | 4c36ef91c4b447259124d483a4ece4e6b7c02647 /src | |
parent | 96567e89fa561075f2033b062fa2881ac86b7bd1 (diff) | |
download | coreutils-2cfb3f4502c8d953858d390d1ccad6b7bc132b44.tar.xz |
(print_full_info): Don't exit with failure status simply
because a user or group number can't be turned into a name.
Diffstat (limited to 'src')
-rw-r--r-- | src/id.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -343,25 +343,19 @@ print_full_info (const char *username) printf ("uid=%lu", (unsigned long int) ruid); pwd = getpwuid (ruid); - if (pwd == NULL) - ok = false; - else + if (pwd) printf ("(%s)", pwd->pw_name); printf (" gid=%lu", (unsigned long int) rgid); grp = getgrgid (rgid); - if (grp == NULL) - ok = false; - else + if (grp) printf ("(%s)", grp->gr_name); if (euid != ruid) { printf (" euid=%lu", (unsigned long int) euid); pwd = getpwuid (euid); - if (pwd == NULL) - ok = false; - else + if (pwd) printf ("(%s)", pwd->pw_name); } @@ -369,9 +363,7 @@ print_full_info (const char *username) { printf (" egid=%lu", (unsigned long int) egid); grp = getgrgid (egid); - if (grp == NULL) - ok = false; - else + if (grp) printf ("(%s)", grp->gr_name); } @@ -396,9 +388,7 @@ print_full_info (const char *username) putchar (','); printf ("%lu", (unsigned long int) groups[i]); grp = getgrgid (groups[i]); - if (grp == NULL) - ok = false; - else + if (grp) printf ("(%s)", grp->gr_name); } free (groups); |