]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: remove CHECK_{DES,MD5} defines
authorDave Reisner <d@falconindy.com>
Tue, 28 Feb 2012 16:45:14 +0000 (11:45 -0500)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2012 10:17:33 +0000 (11:17 +0100)
Remove these always-true defines along with their #ifdef statements.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
login-utils/sulogin.c

index e4d59225ba5862d82fe3f0019169e06707a83e77..14794406b284bee78b64f84da0466df963679622 100644 (file)
@@ -51,9 +51,6 @@
 #  include <selinux/get_context_list.h>
 #endif
 
-#define CHECK_DES      1
-#define CHECK_MD5      1
-
 #define F_PASSWD       "/etc/passwd"
 #define F_SHADOW       "/etc/shadow"
 #define BINSH          "/bin/sh"
@@ -179,7 +176,6 @@ static int valid(const char *pass)
 
        if (pass[0] == 0)
                return 1;
-#if CHECK_MD5
        if (pass[0] != '$')
                goto check_des;
 
@@ -233,8 +229,6 @@ static int valid(const char *pass)
         */
        return 1;
 check_des:
-#endif
-#if CHECK_DES
        if (strlen(pass) != 13)
                return 0;
 
@@ -245,7 +239,6 @@ check_des:
                    *s != '.' && *s != '/')
                        return 0;
        }
-#endif
        return 1;
 }