summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/pdb_tdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 69b2aab229..ca6a2361d7 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -486,10 +486,13 @@ BOOL pdb_getsampwent(SAM_ACCOUNT *user)
sam_user = pdb_get_username(user);
pstrcpy(sam_subst, pdb_get_logon_script(user));
standard_sub_advanced(-1, sam_user, "", gid, sam_user, sam_subst);
+ pdb_set_logon_script(user, sam_subst, True);
pstrcpy(sam_subst, pdb_get_profile_path(user));
standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_username(user), sam_subst);
+ pdb_set_profile_path(user, sam_subst, True);
pstrcpy(sam_subst, pdb_get_homedir(user));
standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_username(user), sam_subst);
+ pdb_set_homedir(user, sam_subst, True);
/* increment to next in line */
global_tdb_ent.key = tdb_nextkey(global_tdb_ent.passwd_tdb, global_tdb_ent.key);
@@ -512,7 +515,7 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, const char *sname)
uid_t uid;
gid_t gid;
- char *sam_user;
+ const char *sam_user;
pstring sam_subst;
if (user==NULL) {
@@ -573,10 +576,13 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, const char *sname)
sam_user = pdb_get_username(user);
pstrcpy(sam_subst, pdb_get_logon_script(user));
standard_sub_advanced(-1, sam_user, "", gid, sam_user, sam_subst);
+ pdb_set_logon_script(user, sam_subst, True);
pstrcpy(sam_subst, pdb_get_profile_path(user));
standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_username(user), sam_subst);
+ pdb_set_profile_path(user, sam_subst, True);
pstrcpy(sam_subst, pdb_get_homedir(user));
standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_username(user), sam_subst);
+ pdb_set_homedir(user, sam_subst, True);
}
else {
DEBUG(0,("pdb_getsampwent: getpwnam(%s) return NULL. User does not exist!\n",