From a1f66a820d78244fcab960fe33999c76cc1d65c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Sep 2000 01:06:39 +0000 Subject: Fix for the SID history problem when using a Win2k domain controller with security=domain. Also fixed to dynamically allocate the SIDs and GIDs. Jeremy. (This used to be commit 2b1f66eb82f05fe0b85ac5b4916e32847b8de675) --- source3/rpc_server/srv_netlog.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'source3/rpc_server/srv_netlog.c') diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c index f634b8e15f..9f5d84ee1f 100644 --- a/source3/rpc_server/srv_netlog.c +++ b/source3/rpc_server/srv_netlog.c @@ -665,18 +665,15 @@ static BOOL api_net_sam_logon(pipes_struct *p) q_l.sam_id.ctr = &ctr; if(!net_io_q_sam_logon("", &q_l, data, 0)) { - DEBUG(0, - ("api_net_sam_logon: Failed to unmarshall NET_Q_SAM_LOGON.\n")); + DEBUG(0, ("api_net_sam_logon: Failed to unmarshall NET_Q_SAM_LOGON.\n")); return False; } /* checks and updates credentials. creates reply credentials */ - if (!deal_with_creds(vuser->dc.sess_key, &(vuser->dc.clnt_cred), - &(q_l.sam_id.client.cred), &srv_cred)) + if (!deal_with_creds(vuser->dc.sess_key, &vuser->dc.clnt_cred, &q_l.sam_id.client.cred, &srv_cred)) status = NT_STATUS_INVALID_HANDLE; else - memcpy(&(vuser->dc.srv_cred), &(vuser->dc.clnt_cred), - sizeof(vuser->dc.clnt_cred)); + memcpy(&vuser->dc.srv_cred, &vuser->dc.clnt_cred, sizeof(vuser->dc.clnt_cred)); /* find the username */ @@ -858,9 +855,13 @@ static BOOL api_net_sam_logon(pipes_struct *p) free((char *)gids); } - if(!net_reply_sam_logon(&q_l, rdata, &srv_cred, &usr_info, status)) + if(!net_reply_sam_logon(&q_l, rdata, &srv_cred, &usr_info, status)) { + free_user_info3(&usr_info); return False; - + } + + free_user_info3(&usr_info); + return True; } -- cgit