]> git.ipfire.org Git - thirdparty/samba.git/commit
s3/locking: tweak share_entry_forall()
authorRalph Boehme <slow@samba.org>
Sat, 12 Oct 2024 14:03:56 +0000 (16:03 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:30 +0000 (14:39 +0000)
commit8d744549420b3be4b4e01ac7165e04ab845ada93
treebaa584a1189e25586e8e07b709275eaf587649ff
parentbd120224dbaf531c1f028ea4a3fc8a0b200dce6a
s3/locking: tweak share_entry_forall()

Gives the callback function more control about when of a locking.tdb
traverse is stopped. If the callback function returns:

  0 => continue traverse
  1 => stop loop over share_mode_entries, but continue share_mode_data traverse
 -1 => stop whole share_mode_data traverse

All existing callers of share_entry_forall() either return 0 or -1 from their
callback functions, so no change in behaviour.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15608

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/locking/share_mode_lock.c