From 55567e5ee9b1a45c77b39f0b340b8694df058c7f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 8 May 2001 05:58:03 +0000 Subject: The substitution of %U and %D in the 'template homedir' is nowdone by lp_string() calling standard_sub_basic(). (This used to be commit 011d45943594a7a4091101b1eec930d13f0a9d12) --- source3/nsswitch/winbindd_user.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'source3/nsswitch/winbindd_user.c') diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index 95830ead20..f23593db88 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -29,6 +29,7 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name, uint32 user_rid, uint32 group_rid, char *full_name, struct winbindd_pw *pw) { + extern userdom_struct current_user_info; fstring name_domain, name_user; pstring homedir; @@ -66,18 +67,13 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name, parse_domain_user(name, name_domain, name_user); - pstrcpy(homedir, lp_template_homedir()); - - /* - * Insist name_user is lowercase, name_domain is uppercase. - * This is a hack. JRA. - */ + /* The substitution of %U and %D in the 'template homedir' is done + by lp_string() calling standard_sub_basic(). */ - strlower(name_user); - strupper(name_domain); + fstrcpy(current_user_info.smb_name, name_user); + fstrcpy(current_user_info.domain, name_domain); - pstring_sub(homedir, "%U", name_user); - pstring_sub(homedir, "%D", name_domain); + pstrcpy(homedir, lp_template_homedir()); safe_strcpy(pw->pw_dir, homedir, sizeof(pw->pw_dir) - 1); -- cgit