summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-13 17:07:53 +0100
committerVolker Lendecke <vlendec@samba.org>2011-02-13 17:56:58 +0100
commit5d63c503f730d7737d043278739b0000a7c562a2 (patch)
treee0e75e87b041e1f5088e528c0d7fc600a39060dd
parent877e0ef5f27f90b784fd1f9a384f3eb6eeac5703 (diff)
downloadsamba-5d63c503f730d7737d043278739b0000a7c562a2.tar.gz
samba-5d63c503f730d7737d043278739b0000a7c562a2.tar.bz2
samba-5d63c503f730d7737d043278739b0000a7c562a2.zip
s3: Add "comment" and "description" to pdb_ads
This is pending a change to samldb_description_check, we might have to modify the description with a TLDAP_MOD_REPLACE operation. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Feb 13 17:56:58 CET 2011 on sn-devel-104
-rw-r--r--source3/passdb/pdb_ads.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index b60615fafe..58e30a1600 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -244,6 +244,18 @@ static NTSTATUS pdb_ads_init_sam_from_priv(struct pdb_methods *m,
pdb_set_profile_path(sam, str, PDB_SET);
}
+ str = tldap_talloc_single_attribute(entry, "comment",
+ talloc_tos());
+ if (str != NULL) {
+ pdb_set_comment(sam, str, PDB_SET);
+ }
+
+ str = tldap_talloc_single_attribute(entry, "description",
+ talloc_tos());
+ if (str != NULL) {
+ pdb_set_acct_desc(sam, str, PDB_SET);
+ }
+
if (!tldap_pull_binsid(entry, "objectSid", &sid)) {
DEBUG(10, ("Could not pull SID\n"));
goto fail;
@@ -354,6 +366,14 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
existing, mem_ctx, pmods, pnum_mods, "profilePath",
"%s", pdb_get_profile_path(sam));
+ ret &= tldap_make_mod_fmt(
+ existing, mem_ctx, pmods, pnum_mods, "comment",
+ "%s", pdb_get_comment(sam));
+
+ ret &= tldap_make_mod_fmt(
+ existing, mem_ctx, pmods, pnum_mods, "description",
+ "%s", pdb_get_acct_desc(sam));
+
fail:
return ret;
}