summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-07 12:04:56 +0200
committerVolker Lendecke <vl@samba.org>2009-06-07 12:32:25 +0200
commitf3b227c0d2abb0d4f02fa2313ff59750a35a4cd2 (patch)
tree56d176a864c3b67e90c420faeb75c5ce1b9eeea4 /source3
parent83dee900bc50099311c6a4b6bf7a293c3a10d29a (diff)
downloadsamba-f3b227c0d2abb0d4f02fa2313ff59750a35a4cd2.tar.gz
samba-f3b227c0d2abb0d4f02fa2313ff59750a35a4cd2.tar.bz2
samba-f3b227c0d2abb0d4f02fa2313ff59750a35a4cd2.zip
Return full info in pdb_ads_search_users()
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ads.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index c55140ed93..5ea8158284 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -856,8 +856,8 @@ static bool pdb_ads_search_users(struct pdb_methods *m,
struct pdb_ads_state *state = talloc_get_type_abort(
m->private_data, struct pdb_ads_state);
struct pdb_ads_search_state *sstate;
- const char * attrs[] = { "objectSid", "sAMAccountName",
- "userAccountControl" };
+ const char * attrs[] = { "objectSid", "sAMAccountName", "displayName",
+ "userAccountControl", "description" };
struct tldap_message **users;
int i, rc, num_users;
@@ -901,9 +901,21 @@ static bool pdb_ads_search_users(struct pdb_methods *m,
}
sid_peek_rid(&sid, &e->rid);
e->acct_flags = ACB_NORMAL;
- e->account_name = "Name";
- e->fullname = "Full Name";
- e->description = "Beschreibung";
+ e->account_name = tldap_talloc_single_attribute(
+ users[i], "samAccountName", sstate->entries);
+ if (e->account_name == NULL) {
+ return false;
+ }
+ e->fullname = tldap_talloc_single_attribute(
+ users[i], "displayName", sstate->entries);
+ if (e->fullname == NULL) {
+ e->fullname = "";
+ }
+ e->description = tldap_talloc_single_attribute(
+ users[i], "description", sstate->entries);
+ if (e->description == NULL) {
+ e->description = "";
+ }
sstate->num_entries += 1;
if (sstate->num_entries >= num_users) {