Fix for MiXed and UPPER case usernames with plaintext PAM passwords.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 20 Sep 2001 03:31:57 +0000 (03:31 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 20 Sep 2001 03:31:57 +0000 (03:31 +0000)
(This used to be commit ba1b411f556bfac8b953c44c81257c7d8fb9817d)

source3/auth/auth_unix.c
source3/smbd/auth_unix.c

index 7c6c58cafa0375e0fa8a07e3a5c1a6725f3d34d2..4740f7fb0dc4622c5b92f62d6a6bec6a5c49c320 100644 (file)
@@ -78,7 +78,7 @@ NTSTATUS check_unix_security(const auth_usersupplied_info *user_info, auth_serve
        pass = Get_Pwnam(user_info->unix_username.str, False);
 
        nt_status = (pass_check(pass,
-                               user_info->unix_username.str, 
+                               pass ? pass->pw_name : user_info->unix_username.str, 
                                user_info->plaintext_password.str,
                                user_info->plaintext_password.len,
                                lp_update_encrypted() ? 
index 7c6c58cafa0375e0fa8a07e3a5c1a6725f3d34d2..4740f7fb0dc4622c5b92f62d6a6bec6a5c49c320 100644 (file)
@@ -78,7 +78,7 @@ NTSTATUS check_unix_security(const auth_usersupplied_info *user_info, auth_serve
        pass = Get_Pwnam(user_info->unix_username.str, False);
 
        nt_status = (pass_check(pass,
-                               user_info->unix_username.str, 
+                               pass ? pass->pw_name : user_info->unix_username.str, 
                                user_info->plaintext_password.str,
                                user_info->plaintext_password.len,
                                lp_update_encrypted() ?