summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-21 19:22:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:18 -0500
commit6622ba566ed3cc3ac362c4e257d7c8ed3c437a8a (patch)
tree56a43592ed6122eb6bf66e63ea82c616fdc36751 /source3/passdb/pdb_ldap.c
parent7b9736eb749d3cd55f0cf19c746cc65bdfd45bf7 (diff)
downloadsamba-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_ldap.c')
-rw-r--r--source3/passdb/pdb_ldap.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 3344b17888..89b958e915 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -441,67 +441,7 @@ static int ldapsam_delete_entry(struct ldapsam_privates *priv,
return smbldap_modify(priv->smbldap_state, dn, mods);
}
-/* New Interface is being implemented here */
-
-#if 0 /* JERRY - not uesed anymore */
-
-/**********************************************************************
-Initialize struct samu from an LDAP query (unix attributes only)
-*********************************************************************/
-static BOOL get_unix_attributes (struct ldapsam_privates *ldap_state,
- struct samu * sampass,
- LDAPMessage * entry,
- gid_t *gid)
-{
- pstring homedir;
- pstring temp;
- char **ldap_values;
- char **values;
-
- if ((ldap_values = ldap_get_values (ldap_state->smbldap_state->ldap_struct, entry, "objectClass")) == NULL) {
- DEBUG (1, ("get_unix_attributes: no objectClass! \n"));
- return False;
- }
-
- for (values=ldap_values;*values;values++) {
- if (strequal(*values, LDAP_OBJ_POSIXACCOUNT )) {
- break;
- }
- }
-
- if (!*values) { /*end of array, no posixAccount */
- DEBUG(10, ("user does not have %s attributes\n", LDAP_OBJ_POSIXACCOUNT));
- ldap_value_free(ldap_values);
- return False;
- }
- ldap_value_free(ldap_values);
-
- if ( !smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct, entry,
- get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_UNIX_HOME), homedir) )
- {
- return False;
- }
-
- if ( !smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct, entry,
- get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_GIDNUMBER), temp) )
- {
- return False;
- }
-
- *gid = (gid_t)atol(temp);
-
- pdb_set_unix_homedir(sampass, homedir, PDB_SET);
-
- DEBUG(10, ("user has %s attributes\n", LDAP_OBJ_POSIXACCOUNT));
-
- return True;
-}
-
-#endif
-
-static time_t ldapsam_get_entry_timestamp(
- struct ldapsam_privates *ldap_state,
- LDAPMessage * entry)
+static time_t ldapsam_get_entry_timestamp( struct ldapsam_privates *ldap_state, LDAPMessage * entry)
{
pstring temp;
struct tm tm;