]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: make code more robust [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 13:33:17 +0000 (14:33 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 13:36:06 +0000 (14:36 +0100)
 ... and more readable for static analyzers

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su-common.c

index 3ef4ec472176d98d7f2c4b608d38fa1c3aaf90ae..5a7b5ff023c2d29993acf3bf6f66b411b4f15579 100644 (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);