From: Stefan Metzmacher Date: Sat, 10 Sep 2022 18:39:37 +0000 (+0200) Subject: s3:locking: let reset_share_mode_entry() report errors to the caller X-Git-Tag: talloc-2.4.0~924 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50188fb441b43d84daca607e3d74f1c2187cedae;p=thirdparty%2Fsamba.git s3:locking: let reset_share_mode_entry() report errors to the caller BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15166 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 794d5015dc0..770da3ba830 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -2453,6 +2453,7 @@ bool reset_share_mode_entry( struct share_mode_entry e; struct share_mode_entry_buf e_buf; NTSTATUS status; + int cmp; bool ret = false; bool ok; @@ -2474,9 +2475,9 @@ bool reset_share_mode_entry( goto done; } - ret = share_mode_entry_cmp( + cmp = share_mode_entry_cmp( old_pid, old_share_file_id, e.pid, e.share_file_id); - if (ret != 0) { + if (cmp != 0) { struct server_id_buf tmp1, tmp2; DBG_WARNING("Expected pid=%s, file_id=%"PRIu64", " "got pid=%s, file_id=%"PRIu64"\n", @@ -2512,5 +2513,5 @@ bool reset_share_mode_entry( ret = true; done: TALLOC_FREE(ltdb); - return true; + return ret; }