summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_ad.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-17 12:33:44 +1000
committerGünther Deschner <gd@samba.org>2010-09-20 16:15:03 -0700
commitd7bc452a893a77eb21b547cd8cdf8b420c60ab5d (patch)
tree32803f84567980382f85b0164e9e9f10a99c1bbd /source3/winbindd/idmap_ad.c
parentd44e86b473554ad549993c928af68e348ccefe2b (diff)
downloadsamba-d7bc452a893a77eb21b547cd8cdf8b420c60ab5d.tar.gz
samba-d7bc452a893a77eb21b547cd8cdf8b420c60ab5d.tar.bz2
samba-d7bc452a893a77eb21b547cd8cdf8b420c60ab5d.zip
s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives
This reduces the manual marshalling of these structures by removing the duplication here. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/winbindd/idmap_ad.c')
-rw-r--r--source3/winbindd/idmap_ad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c
index f2e47a7042..9f2f260951 100644
--- a/source3/winbindd/idmap_ad.c
+++ b/source3/winbindd/idmap_ad.c
@@ -34,6 +34,7 @@
#include "secrets.h"
#include "idmap.h"
#include "../libcli/security/dom_sid.h"
+#include "../libcli/ldap/ldap_ndr.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
@@ -563,7 +564,7 @@ again:
ids[idx]->status = ID_UNKNOWN;
- sidstr = sid_binstring(talloc_tos(), ids[idx]->sid);
+ sidstr = ldap_encode_ndr_dom_sid(talloc_tos(), ids[idx]->sid);
filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)", sidstr);
TALLOC_FREE(sidstr);
@@ -885,7 +886,7 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
attrs[2] = ctx->ad_schema->posix_gecos_attr;
attrs[3] = ctx->ad_schema->posix_gidnumber_attr;
- sidstr = sid_binstring(mem_ctx, sid);
+ sidstr = ldap_encode_ndr_dom_sid(mem_ctx, sid);
filter = talloc_asprintf(mem_ctx, "(objectSid=%s)", sidstr);
TALLOC_FREE(sidstr);