summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-07-23 13:32:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-24 11:01:17 +0200
commit3367fd01d4711c481efc8c56fb424ba3bab68dab (patch)
treeba28403d594586b2832f7016f0c59e07f9844e2c /source3
parentb62b0318155e0c22a0a62ec6735f507b1b6c0f5d (diff)
downloadsamba-3367fd01d4711c481efc8c56fb424ba3bab68dab.tar.gz
samba-3367fd01d4711c481efc8c56fb424ba3bab68dab.tar.bz2
samba-3367fd01d4711c481efc8c56fb424ba3bab68dab.zip
lib/param: Merge handling of security/domain master/domain logons/server role
This ensures that the same input parameters always gives the same output values in both loadparm systems. Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/param/loadparm.c13
-rw-r--r--source3/param/loadparm_ctx.c6
3 files changed, 16 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ddccbb73b4..0b4f093537 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1191,6 +1191,10 @@ bool lp_getwd_cache(void);
int lp_srv_maxprotocol(void);
int lp_srv_minprotocol(void);
int lp_security(void);
+int lp__server_role(void);
+int lp__security(void);
+int lp__domain_master(void);
+bool lp__domain_logons(void);
const char **lp_auth_methods(void);
bool lp_paranoid_server_security(void);
int lp_maxdisksize(void);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index bee204b9c7..39097395de 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -116,7 +116,6 @@ static bool defaults_saved = false;
char *szPrintcapname; \
int CupsEncrypt; \
int iPreferredMaster; \
- int domain_master; \
char *szLdapMachineSuffix; \
char *szLdapUserSuffix; \
char *szLdapIdmapSuffix; \
@@ -5197,7 +5196,6 @@ char *lp_ ## fn_name(TALLOC_CTX *ctx,int i) {return(lp_string((ctx), (LP_SNUM_OK
char lp_ ## fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
-static FN_GLOBAL_BOOL(domain_logons, bDomainLogons)
static FN_GLOBAL_BOOL(_readraw, bReadRaw)
static FN_GLOBAL_BOOL(_writeraw, bWriteRaw)
@@ -5264,7 +5262,6 @@ int lp_cups_encrypt(void)
/* These functions remain in source3/param for now */
-FN_GLOBAL_INTEGER(security, security)
FN_GLOBAL_STRING(configfile, szConfigFile)
#include "lib/param/param_functions.c"
@@ -9555,7 +9552,13 @@ bool lp_readraw(void)
int lp_server_role(void)
{
return lp_find_server_role(lp__server_role(),
- lp_security(),
- lp_domain_logons(),
+ lp__security(),
+ lp__domain_logons(),
lp_domain_master_true_or_auto());
}
+
+int lp_security(void)
+{
+ return lp_find_security(lp__server_role(),
+ lp__security());
+}
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 9c78f15879..75f7e38957 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -73,8 +73,10 @@ static const struct loadparm_s3_helpers s3_fns =
.set_cmdline = lp_set_cmdline,
.dump = lp_dump,
- .server_role = lp_server_role,
- .security = lp_security,
+ ._server_role = lp__server_role,
+ ._security = lp__security,
+ ._domain_master = lp__domain_master,
+ ._domain_logons = lp__domain_logons,
.winbind_separator = lp_winbind_separator,
.template_homedir = lp_template_homedir,