summaryrefslogtreecommitdiff
path: root/source/rpc_server/srv_netlog_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-22 01:21:12 +0000
committerGerald Carter <jerry@samba.org>2005-09-22 01:21:12 +0000
commitd826a6a9b1bb26565fe75781dddac782a4757e90 (patch)
treea0856da45373abedef604417f83489148dcf334e /source/rpc_server/srv_netlog_nt.c
parent7a42b3de7aea0f8afefefd90db7fe8f255163589 (diff)
downloadsamba-d826a6a9b1bb26565fe75781dddac782a4757e90.tar.gz
r10400: commit merge patch from jrasamba-3.0.20rc2
libsmbsharemodes added (Jermey). Linux core dump fix from (James Peach). Linux quota fixes from (metze). krb5 memory leaks from (gd). Creds fix for winbindd and server (Jeremy). winbindd recursion fix (Jeremy). winbindd builtin fix (gd) universal pw error fixes (novell). dir logic fix (Jeremy). hide dotfiles fix (Jeremy) no write to read-only shares fix (?). exclusive open fix (vl). tdb reopen fix (tridge) status display open files fix (Jeremy) posix acl null pointer crash (?) posix acl mem leak (?) mount.cifs flag fix (sfrench) smbspool error message fix (?) libsmbclient comment fix (?). 64-bit error message fixes (Jeremy).
Diffstat (limited to 'source/rpc_server/srv_netlog_nt.c')
-rw-r--r--source/rpc_server/srv_netlog_nt.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index 78ff669d075..15827a8b55e 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -449,7 +449,6 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, &p->dc.clnt_cred, &q_u->clnt_id.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
- reseed_client_creds(&p->dc.clnt_cred, &q_u->clnt_id.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
DEBUG(5,("_net_srv_pwset: %d\n", __LINE__));
@@ -547,7 +546,6 @@ NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOF
return NT_STATUS_INVALID_HANDLE;
/* what happens if we get a logoff for an unknown user? */
- reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
/* XXXX maybe we want to say 'no', reject the client's credentials */
@@ -606,6 +604,8 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, &p->dc.clnt_cred, &q_u->sam_id.client.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
+ memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
+
r_u->buffer_creds = 1; /* yes, we have valid server credentials */
memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
@@ -729,12 +729,6 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
return status;
}
- /* moved from right after deal_with_creds above, since we weren't
- supposed to update unless logon was successful */
-
- reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
- memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
-
if (server_info->guest) {
/* We don't like guest domain logons... */
DEBUG(5,("_net_sam_logon: Attempted domain logon as GUEST denied.\n"));