]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/locking: use DBWRAP_STORE_PERSISTENT in share_mode_data_ltdb_store()
authorRalph Boehme <slow@samba.org>
Tue, 17 Sep 2019 02:53:43 +0000 (19:53 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:36 +0000 (10:18 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/locking/share_mode_lock.c

index 9ff7e487e792cfaccab2ec63b3546d0e4b91014c..9d8fee81ef1b0ce6b6013596935f73227d9ca735 100644 (file)
@@ -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));