summaryrefslogtreecommitdiffstats
path: root/login-utils/su.c
diff options
context:
space:
mode:
authorLudwig Nussel2012-06-01 14:51:20 +0200
committerKarel Zak2012-06-05 15:19:09 +0200
commit1ecb6186c586750f9fcffe58bf784ca2743c246e (patch)
tree524a84056d26b1bd4c8fa690c26d58a846c5f2c5 /login-utils/su.c
parentsu: replace PAM_BAIL_P macro with better solution (diff)
downloadkernel-qcow2-util-linux-1ecb6186c586750f9fcffe58bf784ca2743c246e.tar.gz
kernel-qcow2-util-linux-1ecb6186c586750f9fcffe58bf784ca2743c246e.tar.xz
kernel-qcow2-util-linux-1ecb6186c586750f9fcffe58bf784ca2743c246e.zip
su: remove unused code
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Diffstat (limited to 'login-utils/su.c')
-rw-r--r--login-utils/su.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/login-utils/su.c b/login-utils/su.c
index cabf116d4..9585d07c7 100644
--- a/login-utils/su.c
+++ b/login-utils/su.c
@@ -324,10 +324,7 @@ authenticate (const struct passwd *pw)
if (is_pam_failure(retval))
goto done;
}
-# if 0 /* Manpage discourages use of getlogin. */
- cp = getlogin ();
- if (!(cp && *cp && (lpw = getpwnam (cp)) != NULL && lpw->pw_uid == getuid ()))
-# endif
+
lpw = getpwuid (getuid ());
if (lpw && lpw->pw_name)
{