diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-12-01 14:46:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:41 -0500 |
commit | bd21ee68e5af675a4cd9cfcfb2301ad260c116d5 (patch) | |
tree | 19f29ca84eee339e76563eea557ff3db1b3cfd9b /source3/passdb/pdb_ldap.c | |
parent | e30b176ea3ee9cb6f51eaf38e5fc5e77d0027e3c (diff) | |
download | samba-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/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 66efe5a8ae..fac95e3786 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -604,6 +604,7 @@ static BOOL init_sam_from_ldap(struct ldapsam_privates *ldap_state, LOGIN_CACHE *cache_entry = NULL; uint32 pwHistLen; pstring tmpstring; + BOOL expand_explicit = lp_passdb_expand_explicit(); /* * do a little initialization @@ -776,7 +777,10 @@ static BOOL init_sam_from_ldap(struct ldapsam_privates *ldap_state, PDB_DEFAULT ); } else { pstrcpy( 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); } @@ -788,7 +792,10 @@ static BOOL init_sam_from_ldap(struct ldapsam_privates *ldap_state, PDB_DEFAULT ); } else { pstrcpy( 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); } @@ -800,7 +807,10 @@ static BOOL init_sam_from_ldap(struct ldapsam_privates *ldap_state, PDB_DEFAULT ); } else { pstrcpy( 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); } |