From: Michael Adam Date: Tue, 21 Jul 2015 21:49:45 +0000 (+0200) Subject: param: make 'winbind max domain connections' a generated function. X-Git-Tag: talloc-2.1.4~518 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=496f275a4b3ab568e3900ecedd3f141acbf28851;p=thirdparty%2Fsamba.git param: make 'winbind max domain connections' a generated function. Signed-off-by: Michael Adam Reviewed-by: Jeremy Allison --- diff --git a/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml b/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml index c7642677e95..be39143eb08 100644 --- a/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml +++ b/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml @@ -1,7 +1,7 @@ This parameter specifies the maximum number of simultaneous diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h index 73680bb4de3..2793d2ddbd1 100644 --- a/lib/param/loadparm.h +++ b/lib/param/loadparm.h @@ -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); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index db756d3a07b..216e152e3f9 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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)