su: make code more robust [coverity scan]

... and more readable for static analyzers

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2013-03-27 14:33:17 +01:00
parent 915c1d99f6
commit 82455ad52a
1 changed files with 3 additions and 0 deletions

View File

@ -387,6 +387,9 @@ authenticate (const struct passwd *pw)
case RUNUSER_MODE:
srvname = simulate_login ? PAM_SRVNAME_RUNUSER_L : PAM_SRVNAME_RUNUSER;
break;
default:
abort();
break;
}
retval = pam_start (srvname, pw->pw_name, &conv, &pamh);