]> granicus.if.org Git - shadow/commitdiff
Remove chunk that should not have been committed.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 22 Nov 2007 09:27:51 +0000 (09:27 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 22 Nov 2007 09:27:51 +0000 (09:27 +0000)
lib/encrypt.c

index 539ba034a1bf61d3946e8b7aa58ee73e723c28eb..44f04362f2a8ed43876106d103f98ea32ebf4fa3 100644 (file)
@@ -49,29 +49,6 @@ char *pw_encrypt (const char *clear, const char *salt)
                perror ("crypt");
                exit (1);
        }
-       if (salt && salt[0] == '$' && strlen (cp) <= 13)
-       {
-               /* The crypt algorithm was not recognized by libcrypt */
-               char *method = "$1$";
-               switch (salt[1])
-               {
-                       case '1':
-                               method = "MD5";
-                               break;
-                       case '5':
-                               method = "SHA256";
-                               break;
-                       case '6':
-                               method = "SHA512";
-                               break;
-                       default:
-                               method[1] = salt[1];
-               }
-               fprintf (stderr,
-                        _("Unknown crypt method (%s)\n"),
-                         method);
-               exit (1);
-       }
        if (strlen (cp) != 13)
                return cp;      /* nonstandard crypt() in libc, better bail out */
        strcpy (cipher, cp);