From 37d67c3345e7016cc5e1626e9d0c4ffdebc596fb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 17:34:38 +0000 Subject: libsmb/cli_netlogon.c: Fixed confusing debug messages. param/loadparm.c: Added missing debugs that would have helped me find a misconfiguration I lost a day on.... Jeremy. (This used to be commit 6e9572379784c77f3c4e6a95e18a9641880a8ffc) --- source3/param/loadparm.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 17b9f022f0..0d8df080bd 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1505,6 +1505,8 @@ static char *lp_string(const char *s) #define FN_LOCAL_STRING(fn_name,val) \ char *fn_name(int i) {return(lp_string((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val));} +#define FN_LOCAL_CONST_STRING(fn_name,val) \ + const char *fn_name(int i) {return (const char *)((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_LIST(fn_name,val) \ char **fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_BOOL(fn_name,val) \ @@ -1701,6 +1703,7 @@ FN_LOCAL_STRING(lp_postexec, szPostExec) FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec) FN_LOCAL_STRING(lp_rootpostexec, szRootPostExec) FN_LOCAL_STRING(lp_servicename, szService) +FN_LOCAL_CONST_STRING(lp_const_servicename, szService) FN_LOCAL_STRING(lp_pathname, szPath) FN_LOCAL_STRING(lp_dontdescend, szDontdescend) FN_LOCAL_STRING(lp_username, szUsername) @@ -3550,37 +3553,33 @@ static void set_server_role(void) switch (lp_security()) { case SEC_SHARE: - { - if (lp_domain_logons()) { - DEBUG(0, - ("Server's Role (logon server) conflicts with share-level security\n")); - } + if (lp_domain_logons()) + DEBUG(0, ("Server's Role (logon server) conflicts with share-level security\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } case SEC_SERVER: case SEC_DOMAIN: case SEC_ADS: - { if (lp_domain_logons()) { server_role = ROLE_DOMAIN_BDC; + DEBUG(10,("set_server_role:ROLE_DOMAIN_BDC\n")); break; } server_role = ROLE_DOMAIN_MEMBER; + DEBUG(10,("set_server_role: ROLE_DOMAIN_MEMBER\n")); break; - } case SEC_USER: - { if (lp_domain_logons()) { server_role = ROLE_DOMAIN_PDC; + DEBUG(10,("set_server_role: ROLE_DOMAIN_PDC\n")); break; } + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } default: - { - DEBUG(0, - ("Server's Role undefined due to unknown security mode\n")); - } + DEBUG(0, ("Server's Role undefined due to unknown security mode\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); + break; } } -- cgit