git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f84d42
)
Make sure share_info.tdb is open before attempting to delete an entry
author
Steven Danneman
<steven.danneman@isilon.com>
Mon, 29 Dec 2008 01:16:28 +0000
(17:16 -0800)
committer
Steven Danneman
<steven.danneman@isilon.com>
Mon, 29 Dec 2008 01:45:26 +0000
(17:45 -0800)
source3/lib/sharesec.c
patch
|
blob
|
history
diff --git
a/source3/lib/sharesec.c
b/source3/lib/sharesec.c
index 8ea63a5824d7fef3aac82b5d82e85442a7f043d8..3866ff083fcfd0fa861eecbcdf6e9764e74ff1fd 100644
(file)
--- 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;