From e1dd50bfd753b08575ead364a0c18276e65a6b01 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 17 Dec 2005 15:38:41 +0000 Subject: r12303: Move split_domain_and_name to util_getent.c and make it static there. Volker (This used to be commit e7f348fcf871e8559ecf4e3e597627a78187d1da) --- source3/lib/username.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'source3/lib/username.c') diff --git a/source3/lib/username.c b/source3/lib/username.c index 1973a8c7c6..403a0bc09f 100644 --- a/source3/lib/username.c +++ b/source3/lib/username.c @@ -35,34 +35,6 @@ static BOOL name_is_local(const char *name) return !(strchr_m(name, *lp_winbind_separator())); } -/***************************************************************** - Splits passed user or group name to domain and user/group name parts - Returns True if name was splitted and False otherwise. -*****************************************************************/ - -BOOL split_domain_and_name(const char *name, char *domain, char* username) -{ - char *p = strchr(name,*lp_winbind_separator()); - - - /* Parse a string of the form DOMAIN/user into a domain and a user */ - DEBUG(10,("split_domain_and_name: checking whether name |%s| local or not\n", name)); - - if (p) { - fstrcpy(username, p+1); - fstrcpy(domain, name); - domain[PTR_DIFF(p, name)] = 0; - } else if (lp_winbind_use_default_domain()) { - fstrcpy(username, name); - fstrcpy(domain, lp_workgroup()); - } else { - return False; - } - - DEBUG(10,("split_domain_and_name: all is fine, domain is |%s| and name is |%s|\n", domain, username)); - return True; -} - /**************************************************************************** Get a users home directory. ****************************************************************************/ -- cgit