diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/common/util.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index d52590cd66..0e371082be 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2560,7 +2560,7 @@ int dsdb_find_dn_by_sid(struct ldb_context *ldb, int ret; struct ldb_result *res; const char *attrs[] = { NULL }; - char *sid_str = dom_sid_string(mem_ctx, sid); + char *sid_str = ldap_encode_ndr_dom_sid(mem_ctx, sid); if (!sid_str) { return ldb_operr(ldb); diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index acf796f20f..dca6ece9ee 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -276,8 +276,8 @@ static int samldb_check_primaryGroupID(struct samldb_ctx *ac) return ldb_operr(ldb); } - prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSID=%s)", - dom_sid_string(ac, sid)); + prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSid=%s)", + ldap_encode_ndr_dom_sid(ac, sid)); if (prim_group_dn == NULL) { ldb_asprintf_errstring(ldb, "Failed to find primary group with RID %u!", @@ -929,8 +929,8 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) return ldb_operr(ldb); } - prev_prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSID=%s)", - dom_sid_string(ac, sid)); + prev_prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSid=%s)", + ldap_encode_ndr_dom_sid(ac, sid)); if (prev_prim_group_dn == NULL) { return ldb_operr(ldb); } @@ -948,8 +948,8 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) return ldb_operr(ldb); } - new_prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSID=%s)", - dom_sid_string(ac, sid)); + new_prim_group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSid=%s)", + ldap_encode_ndr_dom_sid(ac, sid)); if (new_prim_group_dn == NULL) { /* Here we know if the specified new primary group candidate is * valid or not. */ @@ -1041,8 +1041,8 @@ static int samldb_member_check(struct samldb_ctx *ac) return ldb_operr(ldb); } - group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSID=%s)", - dom_sid_string(ac, sid)); + group_dn = samdb_search_dn(ldb, ac, NULL, "(objectSid=%s)", + ldap_encode_ndr_dom_sid(ac, sid)); if (group_dn == NULL) { return ldb_operr(ldb); } |