diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-09-26 03:04:20 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-26 06:16:06 +0200 |
commit | 4604219ceba96955b3c4bf6ab31aa70c11442d61 (patch) | |
tree | 1d6638734ff0b86bea0990d08d65cea3cb26567e | |
parent | 3c4d0ce46995f82921f538757783fa7a678a7fc1 (diff) | |
download | samba-4604219ceba96955b3c4bf6ab31aa70c11442d61.tar.gz samba-4604219ceba96955b3c4bf6ab31aa70c11442d61.tar.bz2 samba-4604219ceba96955b3c4bf6ab31aa70c11442d61.zip |
s3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug #9196)
We always set state->te = NULL of TALLOC_FREE(state->te),
before calling smbd_smb2_request_dispatch(), so
open_was_deferred_smb2() always returned false, while dispatching
it again.
But it's remove_deferred_open_message_smb2_internal() which
should reset this state.
In developer mode validate_my_share_entries() did call smb_panic()
before.
metze
-rw-r--r-- | source3/smbd/smb2_create.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 9318a83f48..812d9db1c0 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -377,6 +377,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) struct smbd_smb2_create_state { struct smbd_smb2_request *smb2req; struct smb_request *smb1req; + bool open_was_deferred; struct timed_event *te; struct tevent_immediate *im; struct timeval request_time; @@ -1204,7 +1205,7 @@ bool open_was_deferred_smb2(struct smbd_server_connection *sconn, uint64_t mid) return false; } /* It's not in progress if there's no timeout event. */ - if (!state->te) { + if (!state->open_was_deferred) { return false; } @@ -1235,6 +1236,7 @@ static void remove_deferred_open_message_smb2_internal(struct smbd_smb2_request "mid %llu\n", (unsigned long long)mid )); + state->open_was_deferred = false; /* Ensure we don't have any outstanding timer event. */ TALLOC_FREE(state->te); /* Ensure we don't have any outstanding immediate event. */ @@ -1457,6 +1459,7 @@ bool push_deferred_open_message_smb2(struct smbd_smb2_request *smb2req, &end_time, true) )); + state->open_was_deferred = true; state->te = tevent_add_timer(smb2req->sconn->ev_ctx, state, end_time, |