]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
merge with 1.9
authorJim Meyering <jim@meyering.net>
Tue, 9 Nov 1993 13:21:32 +0000 (13:21 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 9 Nov 1993 13:21:32 +0000 (13:21 +0000)
login-utils/su.c

index 7669aef1aebc2197d900587207843877c39b65ff..6ea70e51c89f7601f23b073575942e2fe81bac2b 100644 (file)
@@ -331,6 +331,11 @@ correct_password (pw)
     return 1;
 
   unencrypted = getpass ("Password:");
+  if (unencrypted == NULL)
+    {
+      error (0, 0, "getpass: cannot open /dev/tty");
+      return 0;
+    }
   encrypted = crypt (unencrypted, correct);
   bzero (unencrypted, strlen (unencrypted));
   return strcmp (encrypted, correct) == 0;