summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_sam.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index fb53941b79..2ab42f7e11 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -328,7 +328,11 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
return nt_status;
}
- if (!NT_STATUS_IS_OK(nt_status = make_server_info_sam(server_info, sampass))) {
+ become_root();
+ nt_status = make_server_info_sam(server_info, sampass);
+ unbecome_root();
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("check_sam_security: make_server_info_sam() failed with '%s'\n", nt_errstr(nt_status)));
pdb_free_sam(&sampass);
data_blob_free(&user_sess_key);