param: make 'winbind max domain connections' a generated function.
authorMichael Adam <obnox@samba.org>
Tue, 21 Jul 2015 21:49:45 +0000 (23:49 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 30 Jul 2015 23:55:30 +0000 (01:55 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml
lib/param/loadparm.h
source3/param/loadparm.c

index c7642677e95e99c5f9b2891d09455f80321de4e8..be39143eb08ef004da60380d138bce11224efea6 100644 (file)
@@ -1,7 +1,7 @@
 <samba:parameter name="winbind max domain connections"
                  context="G"
                  type="integer"
-                 generated_function="0"
+                 function="_winbind_max_domain_connections"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This parameter specifies the maximum number of simultaneous
index 73680bb4de3a92fb54ce75c1929b625c7d56930b..2793d2ddbd1c2096780d4521d5c4206afa9c68d8 100644 (file)
@@ -251,8 +251,7 @@ enum case_handling {CASE_LOWER,CASE_UPPER};
        int CupsEncrypt;                                                \
        char *szIdmapUID;                                               \
        char *szIdmapGID;                                               \
-       char *szIdmapBackend;                                           \
-       int _winbind_max_domain_connections;
+       char *szIdmapBackend;
 
 const char* server_role_str(uint32_t role);
 int lp_find_server_role(int server_role, int security, int domain_logons, int domain_master);
index db756d3a07b4e5358e0e869eba042e9af80c5821..216e152e3f966bce20aef2a97843ec644cdbf9f2 100644 (file)
@@ -1019,18 +1019,15 @@ char *lp_ ## fn_name(TALLOC_CTX *ctx,int i) {return(lp_string((ctx), (LP_SNUM_OK
 #define FN_LOCAL_PARM_CHAR(fn_name,val) \
  char lp_ ## fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
 
-static FN_GLOBAL_INTEGER(winbind_max_domain_connections_int,
-                 _winbind_max_domain_connections)
-
 int lp_winbind_max_domain_connections(void)
 {
        if (lp_winbind_offline_logon() &&
-           lp_winbind_max_domain_connections_int() > 1) {
+           lp__winbind_max_domain_connections() > 1) {
                DEBUG(1, ("offline logons active, restricting max domain "
                          "connections to 1\n"));
                return 1;
        }
-       return MAX(1, lp_winbind_max_domain_connections_int());
+       return MAX(1, lp__winbind_max_domain_connections());
 }
 
 int lp_cups_encrypt(void)