diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-04-01 21:19:53 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-25 20:55:06 +0200 |
commit | a129e271b5385853fb39a8e54b56b508b00a3e41 (patch) | |
tree | e9408a856c26d1c2d49506c2133b3da6b2f8878a /source3/smbd/reply.c | |
parent | faa8edccef556fb281d24b76b9739c994128f6ef (diff) | |
download | samba-a129e271b5385853fb39a8e54b56b508b00a3e41.tar.gz samba-a129e271b5385853fb39a8e54b56b508b00a3e41.tar.bz2 samba-a129e271b5385853fb39a8e54b56b508b00a3e41.zip |
s3:smbd: make use of smbXsrv_session for smb1
Pair-Programmed-With: Michael Adam <obnox@samba.org>
metze
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 50c974f22b..080be5cc94 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2096,6 +2096,8 @@ void reply_ulogoffX(struct smb_request *req) { struct smbd_server_connection *sconn = req->sconn; struct user_struct *vuser; + struct smbXsrv_session *session = NULL; + NTSTATUS status; START_PROFILE(SMBulogoffX); @@ -2111,13 +2113,27 @@ void reply_ulogoffX(struct smb_request *req) return; } - /* in user level security we are supposed to close any files - open by this user */ - if (vuser != NULL) { - file_close_user(sconn, req->vuid); + session = vuser->session; + vuser = NULL; + + /* + * TODO: cancel all outstanding requests on the session + */ + status = smbXsrv_session_logoff(session); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("reply_ulogoff: " + "smbXsrv_session_logoff() failed: %s\n", + nt_errstr(status))); + /* + * If we hit this case, there is something completely + * wrong, so we better disconnect the transport connection. + */ + END_PROFILE(SMBulogoffX); + exit_server(__location__ ": smbXsrv_session_logoff failed"); + return; } - invalidate_vuid(sconn, req->vuid); + TALLOC_FREE(session); reply_outbuf(req, 2, 0); SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */ |