From: Andrew Bartlett Date: Fri, 3 Aug 2001 13:24:38 +0000 (+0000) Subject: This is the fix for the PAM bug I probably introduced in the previous commit, X-Git-Tag: samba-2.2.5pre1~1693^2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9746ad12bd2d310e5c255c7ea491b87170b807af;p=thirdparty%2Fsamba.git This is the fix for the PAM bug I probably introduced in the previous commit, 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 --- diff --git a/source/auth/auth.c b/source/auth/auth.c index 851e1f53cff..4bfbfe65fee 100644 --- a/source/auth/auth.c +++ b/source/auth/auth.c @@ -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) { diff --git a/source/smbd/auth.c b/source/smbd/auth.c index 851e1f53cff..4bfbfe65fee 100644 --- a/source/smbd/auth.c +++ b/source/smbd/auth.c @@ -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) {