From 250c9801197ea1c949bd94c1c891f81ab118b130 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Nov 2002 23:15:52 +0000 Subject: Removed global_myworkgroup, global_myname, global_myscope. Added liberal dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a) --- source3/nsswitch/winbindd_util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/nsswitch/winbindd_util.c') diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 1d18e8fda7..5ad4bada37 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -402,7 +402,7 @@ BOOL winbindd_param_init(void) BOOL check_domain_env(char *domain_env, char *domain) { fstring name; - char *tmp = domain_env; + const char *tmp = domain_env; while(next_token(&tmp, name, ",", sizeof(fstring))) { if (strequal(name, domain)) @@ -413,7 +413,6 @@ BOOL check_domain_env(char *domain_env, char *domain) } /* Parse a string of the form DOMAIN/user into a domain and a user */ -extern fstring global_myworkgroup; BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) { @@ -424,7 +423,7 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) if(!p && lp_winbind_use_default_domain()) { fstrcpy(user, domuser); - fstrcpy(domain, global_myworkgroup); + fstrcpy(domain, lp_workgroup()); } else { fstrcpy(user, p+1); fstrcpy(domain, domuser); @@ -439,13 +438,13 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) 'winbind separator' options. This means: - omit DOMAIN when 'winbind use default domain = true' and DOMAIN is - global_myworkgroup + lp_workgroup */ void fill_domain_username(fstring name, const char *domain, const char *user) { if(lp_winbind_use_default_domain() && - !strcmp(global_myworkgroup, domain)) { + !strcmp(lp_workgroup(), domain)) { strlcpy(name, user, sizeof(fstring)); } else { slprintf(name, sizeof(fstring) - 1, "%s%s%s", -- cgit