The branch, v3-6-test has been updated
       via  254cc7a s3:loadparm: fix the reload of the configuration: also 
reload activated registry shares
       via  cc3c8d1 s3:loadparm: add reload_registry_shares() - reload only 
those shares already loaded (cherry picked from commit 
ec113a58a4dc4e4f3ea03f7818eb312325f69482)
      from  24fe5fe nbt: fix WinXP S3 domain join: alignment of 
nbt_netlogon_response_from_pdc

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 254cc7ae23f2b0108bada37b6b59dd90ac198469
Author: Michael Adam <[email protected]>
Date:   Fri Jul 22 10:11:52 2011 +0200

    s3:loadparm: fix the reload of the configuration: also reload activated 
registry shares
    
    Autobuild-User: Michael Adam <[email protected]>
    Autobuild-Date: Fri Jul 22 16:53:49 CEST 2011 on sn-devel-104
    (cherry picked from commit efbe1602bd014eada4811f336bdccbf4692d3807)
    
    The last 2 patches address bug 8327 (config reload fails to reload shares 
from
    registry).

commit cc3c8d10940ef5d5d0e636b0f9d46606d46b0dc7
Author: Michael Adam <[email protected]>
Date:   Fri Jul 22 10:10:43 2011 +0200

    s3:loadparm: add reload_registry_shares() - reload only those shares 
already loaded (cherry picked from commit 
ec113a58a4dc4e4f3ea03f7818eb312325f69482)

-----------------------------------------------------------------------

Summary of changes:
 source3/param/loadparm.c |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 0a1a4b0..bec525e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7351,6 +7351,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;
@@ -9599,8 +9628,12 @@ static bool lp_load_ex(const char *pszFname,
                bRetval = false;
        }
 
-       if (bRetval && lp_registry_shares() && allow_registry_shares) {
-               bRetval = process_registry_shares();
+       if (bRetval && lp_registry_shares()) {
+               if (allow_registry_shares) {
+                       bRetval = process_registry_shares();
+               } else {
+                       bRetval = reload_registry_shares();
+               }
        }
 
        lp_add_auto_services(lp_auto_services());


-- 
Samba Shared Repository

Reply via email to