summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-08-11 16:34:11 +0000
committerSimo Sorce <idra@samba.org>2001-08-11 16:34:11 +0000
commit8d5916d5fa4aea02cd84d3b2d0793ead9455a50a (patch)
treeb3b4f110820589bcc54f63f47936f014a3139616
parent16afd6d2bcb1aa2241919f0c7a6cc953cba8b2e6 (diff)
downloadsamba-8d5916d5fa4aea02cd84d3b2d0793ead9455a50a.tar.gz
samba-8d5916d5fa4aea02cd84d3b2d0793ead9455a50a.tar.bz2
samba-8d5916d5fa4aea02cd84d3b2d0793ead9455a50a.zip
Without this become_root()/unbecome_root() pair I was not able to login
when samba acting as a PDC. I also removed a pdb_free_sam(sampass), because it sampass was never initialized before... Please abartlet can you check this patch is ok? I feel like this was a bad check-in (This used to be commit f25a5dab6012ebbe83435b06650d6ab92432760a)
-rw-r--r--source3/rpc_server/srv_netlog_nt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 385fec5862..b7e1d3538d 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -563,7 +563,9 @@ static uint32 _net_logon_any(NET_ID_INFO_CTR *ctr, char *user, char *domain, cha
return NT_STATUS_INVALID_INFO_CLASS;
} /* end switch */
+ become_root();
nt_status = check_password(&user_info, &server_info);
+ unbecome_root();
DEBUG(5, ("_net_logon_any: exited with status %d\n", nt_status));
@@ -652,10 +654,8 @@ uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_
/* Check account and password */
- if (status != NT_STATUS_NOPROBLEMO) {
- pdb_free_sam(sampass);
+ if (status != NT_STATUS_NOPROBLEMO)
return status;
- }
pdb_init_sam(&sampass);