summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-08 05:58:03 +0000
committerTim Potter <tpot@samba.org>2001-05-08 05:58:03 +0000
commit55567e5ee9b1a45c77b39f0b340b8694df058c7f (patch)
treee9bdb7533bf7da63a22be9ab35c7a88cce21bd2d /source3
parent0b14ab014481613f4a234b71609d05f8cce9ce2c (diff)
downloadsamba-55567e5ee9b1a45c77b39f0b340b8694df058c7f.tar.gz
samba-55567e5ee9b1a45c77b39f0b340b8694df058c7f.tar.bz2
samba-55567e5ee9b1a45c77b39f0b340b8694df058c7f.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_user.c16
1 files changed, 6 insertions, 10 deletions
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);