summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb_share_modes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c
index 0ba68aed06..180b5b4bfd 100644
--- a/source3/libsmb/smb_share_modes.c
+++ b/source3/libsmb/smb_share_modes.c
@@ -36,7 +36,11 @@ struct smbdb_ctx *smb_share_mode_db_open(const char *db_path)
memset(smb_db, '\0', sizeof(struct smbdb_ctx));
- smb_db->smb_tdb = tdb_open_log(lock_path("locking.tdb"),
+ if (!db_path) {
+ db_path = lock_path("locking.tdb");
+ }
+
+ smb_db->smb_tdb = tdb_open_log(db_path,
0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST,
O_RDWR|O_CREAT,
0644);