diff options
author | Simo Sorce <idra@samba.org> | 2002-07-14 22:21:40 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2002-07-14 22:21:40 +0000 |
commit | 050126e6844519c0587776932063e54b5f2c527c (patch) | |
tree | b05ea046219fa9f3f0889cc82328d7cb8e44e436 /source3/passdb | |
parent | 13157d1494b99bf85632120c27286ba4d877a68f (diff) | |
download | samba-050126e6844519c0587776932063e54b5f2c527c.tar.gz samba-050126e6844519c0587776932063e54b5f2c527c.tar.bz2 samba-050126e6844519c0587776932063e54b5f2c527c.zip |
addedd new (t)alloc_sub_* functions
they will get a const string and return a (t)alloced epanded one.
also modified passdb/* stuff to use this one.
(This used to be commit d378ac1e2efb0efc9a0f983d69cf678ca6255fd5)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 8 | ||||
-rw-r--r-- | source3/passdb/pdb_ldap.c | 8 | ||||
-rw-r--r-- | source3/passdb/pdb_tdb.c | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 2bf3eccfb7..4e3d558e98 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -207,28 +207,28 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) if (pwd->pw_name[strlen(pwd->pw_name)-1] != '$') { pdb_set_profile_path(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_path(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_homedir(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_home(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_dir_drive(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_drive(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_logon_script(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_script(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index fd5ad7ee12..24eb7b9dc1 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -695,7 +695,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "homeDrive", dir_drive)) { - pdb_set_dir_drive(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_dir_drive(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_drive(), username, domain, uid, gid), @@ -705,7 +705,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "smbHome", homedir)) { - pdb_set_homedir(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_homedir(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_home(), username, domain, uid, gid), @@ -715,7 +715,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "scriptPath", logon_script)) { - pdb_set_logon_script(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_logon_script(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_script(), username, domain, uid, gid), @@ -725,7 +725,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "profilePath", profile_path)) { - pdb_set_profile_path(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_profile_path(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_path(), username, domain, uid, gid), diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index b309f675b3..6279318969 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -188,7 +188,7 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, } else { pdb_set_homedir(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_home(), username, domain, uid, gid), @@ -199,7 +199,7 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, pdb_set_dir_drive(sampass, dir_drive, True); else { pdb_set_dir_drive(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_drive(), username, domain, uid, gid), @@ -210,18 +210,18 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, pdb_set_logon_script(sampass, logon_script, True); else { pdb_set_logon_script(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_script(), username, domain, uid, gid), False); } - + if (profile_path) { pdb_set_profile_path(sampass, profile_path, True); } else { pdb_set_profile_path(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_path(), username, domain, uid, gid), |