diff options
author | Steven Danneman <steven.danneman@isilon.com> | 2008-12-28 17:16:28 -0800 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2008-12-28 17:45:26 -0800 |
commit | 9affa82ac29a0cc03049c5440370564680cd66b2 (patch) | |
tree | 8398e55740ee161b1b9d26d2e44ec61d201eccab /source3 | |
parent | 8f84d42f72896170332ade0876fdc9d99350e9f0 (diff) | |
download | samba-9affa82ac29a0cc03049c5440370564680cd66b2.tar.gz samba-9affa82ac29a0cc03049c5440370564680cd66b2.tar.bz2 samba-9affa82ac29a0cc03049c5440370564680cd66b2.zip |
Make sure share_info.tdb is open before attempting to delete an entry
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/sharesec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c index 8ea63a5824..3866ff083f 100644 --- a/source3/lib/sharesec.c +++ b/source3/lib/sharesec.c @@ -41,7 +41,7 @@ static bool share_info_db_init(void) { const char *vstring = "INFO/version"; int32 vers_id; - + if (share_db != NULL) { return True; } @@ -53,7 +53,7 @@ static bool share_info_db_init(void) state_path("share_info.tdb"), strerror(errno) )); return False; } - + vers_id = dbwrap_fetch_int32(share_db, vstring); if (vers_id == SHARE_DATABASE_VERSION_V2) { return true; @@ -252,6 +252,10 @@ bool delete_share_security(const char *servicename) char *key; NTSTATUS status; + if (!share_info_db_init()) { + return False; + } + if (!(key = talloc_asprintf(talloc_tos(), "SECDESC/%s", servicename))) { return False; |