From 14c4d535d25250f9535b66e68cff169300739f78 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 17 Feb 2006 13:30:34 +0000 Subject: r13541: we have to wrap pen_enum_group_memberships() in become/unbecome_root() blocks. This fixes the problem I had with missing groups in the net_samlogon() reply from a Samba PDC. (This used to be commit 06b83fe35048c84dfd68be2ee656317c51e89bce) --- source3/auth/auth_sam.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/auth/auth_sam.c') 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); -- cgit