From d7bc452a893a77eb21b547cd8cdf8b420c60ab5d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 17 Sep 2010 12:33:44 +1000 Subject: s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces the manual marshalling of these structures by removing the duplication here. Andrew Bartlett Signed-off-by: Günther Deschner --- source3/winbindd/idmap_adex/gc_util.c | 3 ++- source3/winbindd/idmap_adex/provider_unified.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/winbindd/idmap_adex') diff --git a/source3/winbindd/idmap_adex/gc_util.c b/source3/winbindd/idmap_adex/gc_util.c index 56bd9542f6..77b318cb2d 100644 --- a/source3/winbindd/idmap_adex/gc_util.c +++ b/source3/winbindd/idmap_adex/gc_util.c @@ -23,6 +23,7 @@ #include "idmap.h" #include "idmap_adex.h" #include "libads/cldap.h" +#include "../libcli/ldap/ldap_ndr.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP @@ -719,7 +720,7 @@ done: *name = NULL; - sid_string = sid_binstring(frame, sid); + sid_string = ldap_encode_ndr_dom_sid(frame, sid); BAIL_ON_PTR_ERROR(sid_string, nt_status); filter = talloc_asprintf(frame, "(objectSid=%s)", sid_string); diff --git a/source3/winbindd/idmap_adex/provider_unified.c b/source3/winbindd/idmap_adex/provider_unified.c index 191f77159c..9f5cc884a5 100644 --- a/source3/winbindd/idmap_adex/provider_unified.c +++ b/source3/winbindd/idmap_adex/provider_unified.c @@ -24,6 +24,7 @@ #include "ads.h" #include "idmap.h" #include "idmap_adex.h" +#include "../libcli/ldap/ldap_ndr.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP @@ -485,7 +486,7 @@ static NTSTATUS search_forest(struct likewise_cell *forest_cell, switch (fdata->ftype) { case SidFilter: - sid_binstr = sid_binstring(frame, &fdata->filter.sid); + sid_binstr = ldap_encode_ndr_dom_sid(frame, &fdata->filter.sid); BAIL_ON_PTR_ERROR(sid_binstr, nt_status); filter = talloc_asprintf(frame, "(objectSid=%s)", sid_binstr); -- cgit