summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-06 01:06:39 +0000
committerJeremy Allison <jra@samba.org>2000-09-06 01:06:39 +0000
commita1f66a820d78244fcab960fe33999c76cc1d65c5 (patch)
tree865aebe7877f3e7844df8d109f842be0f3edd9dd /source3/rpc_server
parentd644d4438cfef54733118cbd09f89518ffb318ca (diff)
downloadsamba-a1f66a820d78244fcab960fe33999c76cc1d65c5.tar.gz
samba-a1f66a820d78244fcab960fe33999c76cc1d65c5.tar.bz2
samba-a1f66a820d78244fcab960fe33999c76cc1d65c5.zip
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)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_netlog.c17
1 files changed, 9 insertions, 8 deletions
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;
}