diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-21 19:22:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:18 -0500 |
commit | 6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a (patch) | |
tree | 56a43592ed6122eb6bf66e63ea82c616fdc36751 /source3/passdb/pdb_get_set.c | |
parent | 7b9736eb749d3cd55f0cf19c746cc65bdfd45bf7 (diff) | |
download | samba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.tar.gz samba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.tar.bz2 samba-6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a.zip |
r13601: * Remove unused code from pdb_ldap.c
* Add a 'struct passwd *' to the struct samu for later reference
(I know this may be controversial but its easily reverted which is
is why I'm checking this is as a seaparate patch before I get
too deep).
* Remove unix_homedir from struct samu {} and update the pdb wrapper
functions associated with it.
(This used to be commit 92c251fdf0f1f566cfeca3c75ba2284b644aef5d)
Diffstat (limited to 'source3/passdb/pdb_get_set.c')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index c39eb71162..92bc228e01 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -265,10 +265,10 @@ const char* pdb_get_homedir (const struct samu *sampass) const char* pdb_get_unix_homedir (const struct samu *sampass) { - if (sampass) - return (sampass->unix_home_dir); - else - return (NULL); + if ( sampass && sampass->unix_pw ) + return ( sampass->unix_pw->pw_dir ); + + return (NULL); } const char* pdb_get_dir_drive (const struct samu *sampass) @@ -830,34 +830,6 @@ BOOL pdb_set_homedir (struct samu *sampass, const char *home_dir, enum pdb_value } /********************************************************************* - Set the user's unix home directory. - ********************************************************************/ - -BOOL pdb_set_unix_homedir (struct samu *sampass, const char *unix_home_dir, enum pdb_value_state flag) -{ - if (!sampass) - return False; - - if (unix_home_dir) { - DEBUG(10, ("pdb_set_unix_homedir: setting home dir %s, was %s\n", unix_home_dir, - (sampass->unix_home_dir)?(sampass->unix_home_dir):"NULL")); - - sampass->unix_home_dir = talloc_strdup(sampass, - unix_home_dir); - - if (!sampass->unix_home_dir) { - DEBUG(0, ("pdb_set_unix_home_dir: talloc_strdup() failed!\n")); - return False; - } - - } else { - sampass->unix_home_dir = PDB_NOT_QUITE_NULL; - } - - return pdb_set_init_flags(sampass, PDB_UNIXHOMEDIR, flag); -} - -/********************************************************************* Set the user's account description. ********************************************************************/ |