summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth.c3
-rw-r--r--source3/smbd/auth.c3
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) {