From: Ralph Boehme Date: Tue, 17 Sep 2019 02:53:43 +0000 (-0700) Subject: s3/locking: use DBWRAP_STORE_PERSISTENT in share_mode_data_ltdb_store() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7799f4295339c8a41571512d67a86e37b9429b83;p=thirdparty%2Fsamba.git s3/locking: use DBWRAP_STORE_PERSISTENT in share_mode_data_ltdb_store() Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 9ff7e487e79..9d8fee81ef1 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -644,6 +644,7 @@ static NTSTATUS share_mode_data_ltdb_store(struct share_mode_data *d, size_t num_share_mode_dbufs) { DATA_BLOB blob = { 0 }; + int flags = 0; NTSTATUS status; if (!d->modified) { @@ -685,11 +686,15 @@ static NTSTATUS share_mode_data_ltdb_store(struct share_mode_data *d, ltdb->share_mode_data_len = blob.length; store: + if (d->num_persistent > 0) { + flags |= DBWRAP_STORE_PERSISTENT; + } + status = locking_tdb_data_store(key, ltdb, share_mode_dbufs, num_share_mode_dbufs, - 0); + flags); if (!NT_STATUS_IS_OK(status)) { DBG_ERR("locking_tdb_data_store failed: %s\n", nt_errstr(status));