Without this become_root()/unbecome_root() pair I was not able to login
authorSimo Sorce <idra@samba.org>
Sat, 11 Aug 2001 16:34:11 +0000 (16:34 +0000)
committerSimo Sorce <idra@samba.org>
Sat, 11 Aug 2001 16:34:11 +0000 (16:34 +0000)
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

source/rpc_server/srv_netlog_nt.c

index 385fec5862c66bc61be3ac342609c6bc18e82f1d..b7e1d3538db64d40441f355749ee04282c8cb2bd 100644 (file)
@@ -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);