]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
This is the fix for the PAM bug I probably introduced in the previous commit,
authorAndrew Bartlett <abartlet@samba.org>
Fri, 3 Aug 2001 13:24:38 +0000 (13:24 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 3 Aug 2001 13:24:38 +0000 (13:24 +0000)
which I will confirm once I can find a box it would break on in the first place.

(this is the pam accounts as nobody thing we had with 2.2.0)

Andrew Bartlett

source/auth/auth.c
source/smbd/auth.c

index 851e1f53cffc664ca716fb1a4aa1471c26d9c3a6..4bfbfe65fee4ec0361a931c339cc9379b351a87a 100644 (file)
@@ -131,7 +131,10 @@ uint32 check_password(const auth_usersupplied_info *user_info, auth_serversuppli
        }
        
        if (nt_status == NT_STATUS_NOPROBLEMO) {
+               /* We might not be root if we are an RPC call */
+               become_root();
                nt_status = smb_pam_accountcheck(user_info->smb_username.str);
+               unbecome_root();
        }
 
        if (nt_status == NT_STATUS_NOPROBLEMO) {
index 851e1f53cffc664ca716fb1a4aa1471c26d9c3a6..4bfbfe65fee4ec0361a931c339cc9379b351a87a 100644 (file)
@@ -131,7 +131,10 @@ uint32 check_password(const auth_usersupplied_info *user_info, auth_serversuppli
        }
        
        if (nt_status == NT_STATUS_NOPROBLEMO) {
+               /* We might not be root if we are an RPC call */
+               become_root();
                nt_status = smb_pam_accountcheck(user_info->smb_username.str);
+               unbecome_root();
        }
 
        if (nt_status == NT_STATUS_NOPROBLEMO) {