summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-07-22 10:10:43 +0200
committerMichael Adam <obnox@samba.org>2011-07-22 15:42:18 +0200
commitec113a58a4dc4e4f3ea03f7818eb312325f69482 (patch)
tree3a57f181d550c857b25afa2771540d966eb2b5c0
parent2b4bb9b7a127dbaae9af8b1d48e56986ef70b974 (diff)
downloadsamba-ec113a58a4dc4e4f3ea03f7818eb312325f69482.tar.gz
samba-ec113a58a4dc4e4f3ea03f7818eb312325f69482.tar.bz2
samba-ec113a58a4dc4e4f3ea03f7818eb312325f69482.zip
s3:loadparm: add reload_registry_shares() - reload only those shares already loaded
-rw-r--r--source3/param/loadparm.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 16eb719f92..b23c8ddb88 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6743,6 +6743,35 @@ done:
return ret;
}
+/**
+ * reload those shares from registry that are already
+ * activated in the services array.
+ */
+static bool reload_registry_shares(void)
+{
+ int i;
+ bool ret = true;
+
+ for (i = 0; i < iNumServices; i++) {
+ if (!VALID(i)) {
+ continue;
+ }
+
+ if (ServicePtrs[i]->usershare == USERSHARE_VALID) {
+ continue;
+ }
+
+ ret = process_registry_service(ServicePtrs[i]->szService);
+ if (!ret) {
+ goto done;
+ }
+ }
+
+done:
+ return ret;
+}
+
+
#define MAX_INCLUDE_DEPTH 100
static uint8_t include_depth;