diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-05-01 20:02:38 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-05-06 22:33:19 +0200 |
commit | 5169e9b20c69092d04b596f48ca0e69a46af438f (patch) | |
tree | 57450c0abcce3c54d5e0780c59305e1297d75910 /source3/smbd/notify.c | |
parent | a5981d137461e5715c92a4fb4cdeaa650f34e999 (diff) | |
download | samba-5169e9b20c69092d04b596f48ca0e69a46af438f.tar.gz |
s3:smbd: use STATUS_NOTIFY_CLEANUP on smb2 logoff (explicit and implicit) and tdis
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/notify.c')
-rw-r--r-- | source3/smbd/notify.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 4f4ca2fab8f..b3079d2c078 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -379,8 +379,22 @@ static void smbd_notify_cancel_by_map(struct notify_mid_map *map) { struct smb_request *smbreq = map->req->req; struct smbd_server_connection *sconn = smbreq->sconn; + struct smbd_smb2_request *smb2req = smbreq->smb2req; NTSTATUS notify_status = NT_STATUS_CANCELLED; + if (smb2req != NULL) { + if (smb2req->session == NULL) { + notify_status = STATUS_NOTIFY_CLEANUP; + } else if (!NT_STATUS_IS_OK(smb2req->session->status)) { + notify_status = STATUS_NOTIFY_CLEANUP; + } + if (smb2req->tcon == NULL) { + notify_status = STATUS_NOTIFY_CLEANUP; + } else if (!NT_STATUS_IS_OK(smb2req->tcon->status)) { + notify_status = STATUS_NOTIFY_CLEANUP; + } + } + change_notify_reply(smbreq, notify_status, 0, NULL, map->req->reply_fn); change_notify_remove_request(sconn, map->req); |