summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-12-01 14:46:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:41 -0500
commitbd21ee68e5af675a4cd9cfcfb2301ad260c116d5 (patch)
tree19f29ca84eee339e76563eea557ff3db1b3cfd9b /source3/passdb/passdb.c
parente30b176ea3ee9cb6f51eaf38e5fc5e77d0027e3c (diff)
downloadsamba-bd21ee68e5af675a4cd9cfcfb2301ad260c116d5.tar.gz
samba-bd21ee68e5af675a4cd9cfcfb2301ad260c116d5.tar.bz2
samba-bd21ee68e5af675a4cd9cfcfb2301ad260c116d5.zip
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)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c16
1 files changed, 13 insertions, 3 deletions
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 {