The branch, v3-5-test has been updated
       via  12b60f9 s3:loadparm: fix the reload of the configuration: also 
reload activated registry shares
       via  bc5a7f2 s3:loadparm: add reload_registry_shares() - reload only 
those shares already loaded (cherry picked from commit 
ec113a58a4dc4e4f3ea03f7818eb312325f69482)
      from  461adc6 s3:client: ignore SMBecho errors (the server may not 
support it) (bug #8139) Signed-off-by: Jeremy Allison <j...@samba.org> (cherry 
picked from commit bb28a9387d3c76f6f8c7f79ec61d37a499d6c8f6)

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


- Log -----------------------------------------------------------------
commit 12b60f9688cb64fbfce729b3555ab75a71fbb949
Author: Michael Adam <ob...@samba.org>
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 <ob...@samba.org>
    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 bc5a7f23e1e909a2196a1038da20c3391c922614
Author: Michael Adam <ob...@samba.org>
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 08b6532..28ffc08 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7058,6 +7058,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;
@@ -9246,8 +9275,12 @@ 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