diff options
-rw-r--r-- | lib/pwdutils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/pwdutils.c b/lib/pwdutils.c index d97020cb9..641a9da40 100644 --- a/lib/pwdutils.c +++ b/lib/pwdutils.c @@ -104,11 +104,6 @@ char *xgetlogin(void) { struct passwd *pw = NULL; uid_t ruid; - char *user; - - user = getlogin(); - if (user) - return xstrdup(user); /* GNU Hurd implementation has an extension where a process can exist in a * non-conforming environment, and thus be outside the realms of POSIX @@ -117,6 +112,9 @@ char *xgetlogin(void) * environment. * * http://austingroupbugs.net/view.php?id=511 + * + * The same implementation is useful for other systems, since getlogin(3) + * shouldn't be used as actual identification. */ errno = 0; ruid = getuid(); |