From bd21ee68e5af675a4cd9cfcfb2301ad260c116d5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 1 Dec 2005 14:46:56 +0000 Subject: r11999: Re-add "passdb expand explicit". We came to the conclusion that changing the default is something that has to wait one or two more releases, but it will happen one way or the other. Volker (This used to be commit 30fcdf84d8943e630af78a96320607c42e4d15aa) --- source3/passdb/passdb.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source3/passdb/passdb.c') diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index c893ebcd42..e073db3499 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -1751,6 +1751,7 @@ BOOL init_sam_from_buffer_v2(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) uint32 pwHistLen = 0; BOOL ret = True; fstring tmpstring; + BOOL expand_explicit = lp_passdb_expand_explicit(); if(sampass == NULL || buf == NULL) { DEBUG(0, ("init_sam_from_buffer_v2: NULL parameters found!\n")); @@ -1815,7 +1816,10 @@ BOOL init_sam_from_buffer_v2(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) if (homedir) { fstrcpy( tmpstring, homedir ); - standard_sub_basic( username, tmpstring, sizeof(tmpstring) ); + if (expand_explicit) { + standard_sub_basic( username, tmpstring, + sizeof(tmpstring) ); + } pdb_set_homedir(sampass, tmpstring, PDB_SET); } else { @@ -1831,7 +1835,10 @@ BOOL init_sam_from_buffer_v2(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) if (logon_script) { fstrcpy( tmpstring, logon_script ); - standard_sub_basic( username, tmpstring, sizeof(tmpstring) ); + if (expand_explicit) { + standard_sub_basic( username, tmpstring, + sizeof(tmpstring) ); + } pdb_set_logon_script(sampass, tmpstring, PDB_SET); } else { @@ -1842,7 +1849,10 @@ BOOL init_sam_from_buffer_v2(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) if (profile_path) { fstrcpy( tmpstring, profile_path ); - standard_sub_basic( username, tmpstring, sizeof(tmpstring) ); + if (expand_explicit) { + standard_sub_basic( username, tmpstring, + sizeof(tmpstring) ); + } pdb_set_profile_path(sampass, tmpstring, PDB_SET); } else { -- cgit