summaryrefslogtreecommitdiff
path: root/source3/smbd/auth_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/auth_unix.c')
-rw-r--r--source3/smbd/auth_unix.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/smbd/auth_unix.c b/source3/smbd/auth_unix.c
index ea32a65457..7c6c58cafa 100644
--- a/source3/smbd/auth_unix.c
+++ b/source3/smbd/auth_unix.c
@@ -71,13 +71,19 @@ in PLAIN TEXT
NTSTATUS check_unix_security(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
{
NTSTATUS nt_status;
-
+ struct passwd *pass = NULL;
+
become_root();
- nt_status = (pass_check(user_info->unix_username.str,
- user_info->plaintext_password.str,
+
+ pass = Get_Pwnam(user_info->unix_username.str, False);
+
+ nt_status = (pass_check(pass,
+ user_info->unix_username.str,
+ user_info->plaintext_password.str,
user_info->plaintext_password.len,
lp_update_encrypted() ?
- update_smbpassword_file : NULL)
+ update_smbpassword_file : NULL,
+ True)
? NT_STATUS_OK : NT_STATUS_LOGON_FAILURE);
unbecome_root();