diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-08-03 13:24:38 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-08-03 13:24:38 +0000 |
commit | 384b522c9235ab538c23b64bdf9b3d57e4b15b53 (patch) | |
tree | 4a15b33083f148702f5dd68ac97cb635db040de2 | |
parent | 986372901e85a79343ba32f590a4a3e7658d2565 (diff) | |
download | samba-384b522c9235ab538c23b64bdf9b3d57e4b15b53.tar.gz samba-384b522c9235ab538c23b64bdf9b3d57e4b15b53.tar.bz2 samba-384b522c9235ab538c23b64bdf9b3d57e4b15b53.zip |
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
(This used to be commit 9746ad12bd2d310e5c255c7ea491b87170b807af)
-rw-r--r-- | source3/auth/auth.c | 3 | ||||
-rw-r--r-- | source3/smbd/auth.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 851e1f53cf..4bfbfe65fe 100644 --- a/source3/auth/auth.c +++ b/source3/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/source3/smbd/auth.c b/source3/smbd/auth.c index 851e1f53cf..4bfbfe65fe 100644 --- a/source3/smbd/auth.c +++ b/source3/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) { |