diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_util.c | 3 | ||||
-rw-r--r-- | source3/auth/server_info.c | 10 | ||||
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/netapi/group.c | 5 | ||||
-rw-r--r-- | source3/lib/netapi/user.c | 15 | ||||
-rw-r--r-- | source3/lib/secdesc.c | 4 | ||||
-rw-r--r-- | source3/lib/util_sid.c | 19 | ||||
-rw-r--r-- | source3/libnet/libnet_join.c | 7 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync.c | 3 | ||||
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 3 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 12 | ||||
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 3 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 3 | ||||
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_rpc.c | 5 |
16 files changed, 45 insertions, 56 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 5e3091c7ae..825452026e 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -26,6 +26,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../lib/crypto/arcfour.h" #include "rpc_client/init_lsa.h" +#include "../libcli/security/dom_sid.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH @@ -664,7 +665,7 @@ static NTSTATUS get_guest_info3(TALLOC_CTX *mem_ctx, /* Domain sid */ sid_copy(&domain_sid, get_global_sam_sid()); - info3->base.domain_sid = sid_dup_talloc(mem_ctx, &domain_sid); + info3->base.domain_sid = dom_sid_dup(mem_ctx, &domain_sid); if (info3->base.domain_sid == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index c7cd72bb87..690838d779 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -230,7 +230,7 @@ static NTSTATUS append_netr_SidAttr(TALLOC_CTX *mem_ctx, if (*sids == NULL) { return NT_STATUS_NO_MEMORY; } - (*sids)[t].sid = sid_dup_talloc(*sids, asid); + (*sids)[t].sid = dom_sid_dup(*sids, asid); if ((*sids)[t].sid == NULL) { return NT_STATUS_NO_MEMORY; } @@ -468,7 +468,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx, pdb_get_domain(samu)); RET_NOMEM(info3->base.domain.string); - info3->base.domain_sid = sid_dup_talloc(info3, &domain_sid); + info3->base.domain_sid = dom_sid_dup(info3, &domain_sid); RET_NOMEM(info3->base.domain_sid); info3->base.acct_flags = pdb_get_acct_ctrl(samu); @@ -548,7 +548,7 @@ struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx, } if (orig->base.domain_sid) { - info3->base.domain_sid = sid_dup_talloc(info3, orig->base.domain_sid); + info3->base.domain_sid = dom_sid_dup(info3, orig->base.domain_sid); RET_NOMEM(info3->base.domain_sid); } @@ -558,7 +558,7 @@ struct netr_SamInfo3 *copy_netr_SamInfo3(TALLOC_CTX *mem_ctx, orig->sidcount); RET_NOMEM(info3->sids); for (i = 0; i < orig->sidcount; i++) { - info3->sids[i].sid = sid_dup_talloc(info3->sids, + info3->sids[i].sid = dom_sid_dup(info3->sids, orig->sids[i].sid); RET_NOMEM(info3->sids[i].sid); info3->sids[i].attributes = @@ -695,7 +695,7 @@ struct netr_SamInfo3 *wbcAuthUserInfo_to_netr_SamInfo3(TALLOC_CTX *mem_ctx, RET_NOMEM(info3->base.domain.string); } - info3->base.domain_sid = sid_dup_talloc(info3, &domain_sid); + info3->base.domain_sid = dom_sid_dup(info3, &domain_sid); RET_NOMEM(info3->base.domain_sid); memcpy(info3->base.LMSessKey.key, info->lm_session_key, 8); diff --git a/source3/include/proto.h b/source3/include/proto.h index 7a9d16090b..d19cea8023 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1297,7 +1297,6 @@ bool sid_parse(const char *inbuf, size_t len, struct dom_sid *sid); bool non_mappable_sid(struct dom_sid *sid); char *sid_binstring(TALLOC_CTX *mem_ctx, const struct dom_sid *sid); char *sid_binstring_hex(const struct dom_sid *sid); -struct dom_sid *sid_dup_talloc(TALLOC_CTX *ctx, const struct dom_sid *src); NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, struct dom_sid **sids, uint32_t *num); NTSTATUS add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index 53114b5d7d..6a926953c0 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -25,6 +25,7 @@ #include "lib/netapi/libnetapi.h" #include "../librpc/gen_ndr/cli_samr.h" #include "rpc_client/init_lsa.h" +#include "../libcli/security/dom_sid.h" /**************************************************************** ****************************************************************/ @@ -603,7 +604,7 @@ static WERROR map_group_info_to_buffer(TALLOC_CTX *mem_ctx, info3.grpi3_name = info->name.string; info3.grpi3_comment = info->description.string; info3.grpi3_attributes = info->attributes; - info3.grpi3_group_sid = (struct domsid *)sid_dup_talloc(mem_ctx, &sid); + info3.grpi3_group_sid = (struct domsid *)dom_sid_dup(mem_ctx, &sid); *buffer = (uint8_t *)talloc_memdup(mem_ctx, &info3, sizeof(info3)); @@ -1086,7 +1087,7 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_3_buffer(TALLOC_CTX *mem_ct groups->entries[i].account_name.string); g3[i].grpi3_comment = talloc_strdup(mem_ctx, groups->entries[i].description.string); - g3[i].grpi3_group_sid = (struct domsid *)sid_dup_talloc(mem_ctx, &sid); + g3[i].grpi3_group_sid = (struct domsid *)dom_sid_dup(mem_ctx, &sid); g3[i].grpi3_attributes = groups->entries[i].acct_flags; W_ERROR_HAVE_NO_MEMORY(g3[i].grpi3_name); } diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 67a7443cd4..de0fc7da6e 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -27,6 +27,7 @@ #include "rpc_client/init_samr.h" #include "../libds/common/flags.h" #include "rpc_client/init_lsa.h" +#include "../libcli/security/dom_sid.h" /**************************************************************** ****************************************************************/ @@ -705,12 +706,12 @@ static NTSTATUS libnetapi_samr_lookup_user(TALLOC_CTX *mem_ctx, for (i=0; i<rid_array->count; i++) { sid_compose(&sid, domain_sid, rid_array->rids[i].rid); - sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sid); + sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sid); NT_STATUS_HAVE_NO_MEMORY(sid_array.sids[i].sid); } sid_compose(&sid, domain_sid, rid); - sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sid); + sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sid); NT_STATUS_HAVE_NO_MEMORY(sid_array.sids[i].sid); status = rpccli_samr_GetAliasMembership(pipe_cli, mem_ctx, @@ -923,7 +924,7 @@ static NTSTATUS info21_to_USER_INFO_4(TALLOC_CTX *mem_ctx, if (!sid_compose(&sid, domain_sid, i21->rid)) { return NT_STATUS_NO_MEMORY; } - i->usri4_user_sid = (struct domsid *)sid_dup_talloc(mem_ctx, &sid); + i->usri4_user_sid = (struct domsid *)dom_sid_dup(mem_ctx, &sid); i->usri4_primary_group_id = i21->primary_gid; i->usri4_profile = talloc_strdup(mem_ctx, i21->profile_path.string); i->usri4_home_dir_drive = talloc_strdup(mem_ctx, i21->home_drive.string); @@ -1024,7 +1025,7 @@ static NTSTATUS info21_to_USER_INFO_23(TALLOC_CTX *mem_ctx, if (!sid_compose(&sid, domain_sid, i21->rid)) { return NT_STATUS_NO_MEMORY; } - i->usri23_user_sid = (struct domsid *)sid_dup_talloc(mem_ctx, &sid); + i->usri23_user_sid = (struct domsid *)dom_sid_dup(mem_ctx, &sid); return NT_STATUS_OK; } @@ -2066,7 +2067,7 @@ static NTSTATUS query_USER_MODALS_INFO_2(TALLOC_CTX *mem_ctx, info2->usrmod2_domain_name = talloc_strdup(mem_ctx, dom_info5.domain_name.string); info2->usrmod2_domain_id = - (struct domsid *)sid_dup_talloc(mem_ctx, domain_sid); + (struct domsid *)dom_sid_dup(mem_ctx, domain_sid); NT_STATUS_HAVE_NO_MEMORY(info2->usrmod2_domain_name); NT_STATUS_HAVE_NO_MEMORY(info2->usrmod2_domain_id); @@ -3334,7 +3335,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx, goto done; } - sid_array.sids[0].sid = sid_dup_talloc(ctx, &user_sid); + sid_array.sids[0].sid = dom_sid_dup(ctx, &user_sid); if (!sid_array.sids[0].sid) { werr = WERR_NOMEM; goto done; @@ -3348,7 +3349,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx, goto done; } - sid_array.sids[i+1].sid = sid_dup_talloc(ctx, &sid); + sid_array.sids[i+1].sid = dom_sid_dup(ctx, &sid); if (!sid_array.sids[i+1].sid) { werr = WERR_NOMEM; goto done; diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c index b8bb0acf7b..11256817a5 100644 --- a/source3/lib/secdesc.c +++ b/source3/lib/secdesc.c @@ -191,10 +191,10 @@ struct security_descriptor *make_sec_desc(TALLOC_CTX *ctx, dst->sacl = NULL; dst->dacl = NULL; - if(owner_sid && ((dst->owner_sid = sid_dup_talloc(dst,owner_sid)) == NULL)) + if(owner_sid && ((dst->owner_sid = dom_sid_dup(dst,owner_sid)) == NULL)) goto error_exit; - if(grp_sid && ((dst->group_sid = sid_dup_talloc(dst,grp_sid)) == NULL)) + if(grp_sid && ((dst->group_sid = dom_sid_dup(dst,grp_sid)) == NULL)) goto error_exit; if(sacl && ((dst->sacl = dup_sec_acl(dst, sacl)) == NULL)) diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 1873692f0f..d75c8e2c97 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -366,25 +366,6 @@ char *sid_binstring_hex(const struct dom_sid *sid) return s; } -/******************************************************************* - Tallocs a duplicate SID. -********************************************************************/ - -struct dom_sid *sid_dup_talloc(TALLOC_CTX *ctx, const struct dom_sid *src) -{ - struct dom_sid *dst; - - if (src == NULL) { - return NULL; - } - dst = talloc_zero(ctx, struct dom_sid); - if (dst == NULL) { - return NULL; - } - sid_copy(dst, src); - return dst; -} - /******************************************************************** Add SID to an array SIDs ********************************************************************/ diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 34fe3a72ab..28b2f6c654 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -35,6 +35,7 @@ #include "secrets.h" #include "rpc_client/init_lsa.h" #include "krb5_env.h" +#include "../libcli/security/dom_sid.h" /**************************************************************** ****************************************************************/ @@ -744,7 +745,7 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx, r->out.netbios_domain_name = info->dns.name.string; r->out.dns_domain_name = info->dns.dns_domain.string; r->out.forest_name = info->dns.dns_forest.string; - r->out.domain_sid = sid_dup_talloc(mem_ctx, info->dns.sid); + r->out.domain_sid = dom_sid_dup(mem_ctx, info->dns.sid); NT_STATUS_HAVE_NO_MEMORY(r->out.domain_sid); } @@ -758,7 +759,7 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx, } r->out.netbios_domain_name = info->account_domain.name.string; - r->out.domain_sid = sid_dup_talloc(mem_ctx, info->account_domain.sid); + r->out.domain_sid = dom_sid_dup(mem_ctx, info->account_domain.sid); NT_STATUS_HAVE_NO_MEMORY(r->out.domain_sid); } @@ -2008,7 +2009,7 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, "Unable to fetch domain sid: are we joined?"); return WERR_SETUP_NOT_JOINED; } - r->in.domain_sid = sid_dup_talloc(mem_ctx, &sid); + r->in.domain_sid = dom_sid_dup(mem_ctx, &sid); W_ERROR_HAVE_NO_MEMORY(r->in.domain_sid); } diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index 6668be28b5..1b5b9c3b2f 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -28,6 +28,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "../librpc/gen_ndr/cli_netlogon.h" +#include "../libcli/security/dom_sid.h" /** * Fix up the delta, dealing with encryption issues so that the final @@ -72,7 +73,7 @@ NTSTATUS libnet_samsync_init_context(TALLOC_CTX *mem_ctx, NT_STATUS_HAVE_NO_MEMORY(ctx); if (domain_sid) { - ctx->domain_sid = sid_dup_talloc(mem_ctx, domain_sid); + ctx->domain_sid = dom_sid_dup(mem_ctx, domain_sid); NT_STATUS_HAVE_NO_MEMORY(ctx->domain_sid); ctx->domain_sid_str = sid_string_talloc(mem_ctx, ctx->domain_sid); diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 823bdfac6a..52fd6037e0 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -26,6 +26,7 @@ #include "../librpc/gen_ndr/cli_lsa.h" #include "rpc_client/cli_lsarpc.h" #include "rpc_client/init_lsa.h" +#include "../libcli/security/dom_sid.h" /** @defgroup lsa LSA - Local Security Architecture * @ingroup rpc_client @@ -145,7 +146,7 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli, } for (i = 0; i<num_sids; i++) { - sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sids[i]); + sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sids[i]); if (!sid_array.sids[i].sid) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 02cb578671..191cdfeb66 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -117,7 +117,7 @@ static int init_lsa_ref_domain_list(TALLOC_CTX *mem_ctx, ZERO_STRUCT(ref->domains[num]); init_lsa_StringLarge(&ref->domains[num].name, dom_name); - ref->domains[num].sid = sid_dup_talloc(mem_ctx, dom_sid); + ref->domains[num].sid = dom_sid_dup(mem_ctx, dom_sid); if (!ref->domains[num].sid) { return -1; } @@ -307,7 +307,7 @@ static NTSTATUS lookup_lsa_sids(TALLOC_CTX *mem_ctx, /* Initialize the lsa_TranslatedSid3 return. */ trans_sids[i].sid_type = type; - trans_sids[i].sid = sid_dup_talloc(mem_ctx, &sid); + trans_sids[i].sid = dom_sid_dup(mem_ctx, &sid); trans_sids[i].sid_index = dom_idx; } @@ -654,7 +654,7 @@ NTSTATUS _lsa_QueryInfoPolicy(struct pipes_struct *p, case ROLE_DOMAIN_PDC: case ROLE_DOMAIN_BDC: name = get_global_sam_name(); - sid = sid_dup_talloc(p->mem_ctx, get_global_sam_sid()); + sid = dom_sid_dup(p->mem_ctx, get_global_sam_sid()); if (!sid) { return NT_STATUS_NO_MEMORY; } @@ -663,7 +663,7 @@ NTSTATUS _lsa_QueryInfoPolicy(struct pipes_struct *p, name = lp_workgroup(); /* We need to return the Domain SID here. */ if (secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) { - sid = sid_dup_talloc(p->mem_ctx, &domain_sid); + sid = dom_sid_dup(p->mem_ctx, &domain_sid); if (!sid) { return NT_STATUS_NO_MEMORY; } @@ -1606,7 +1606,7 @@ NTSTATUS _lsa_EnumAccounts(struct pipes_struct *p, } for (i = *r->in.resume_handle, j = 0; i < num_entries; i++, j++) { - sids[j].sid = sid_dup_talloc(p->mem_ctx, &sid_list[i]); + sids[j].sid = dom_sid_dup(p->mem_ctx, &sid_list[i]); if (!sids[j].sid) { talloc_free(sid_list); return NT_STATUS_NO_MEMORY; @@ -2428,7 +2428,7 @@ NTSTATUS _lsa_EnumAccountsWithUserRight(struct pipes_struct *p, r->out.sids->num_sids); for (i=0; i < r->out.sids->num_sids; i++) { - r->out.sids->sids[i].sid = sid_dup_talloc(r->out.sids->sids, + r->out.sids->sids[i].sid = dom_sid_dup(r->out.sids->sids, &sids[i]); if (!r->out.sids->sids[i].sid) { TALLOC_FREE(r->out.sids->sids); diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 4b692b36fc..76da1d00d6 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -36,6 +36,7 @@ #include "../lib/crypto/md4.h" #include "rpc_client/init_lsa.h" #include "rpc_server/rpc_ncacn_np.h" +#include "../libcli/security/dom_sid.h" extern userdom_struct current_user_info; @@ -909,7 +910,7 @@ NTSTATUS _netr_ServerAuthenticate3(struct pipes_struct *p, goto out; } - creds->sid = sid_dup_talloc(creds, &sid); + creds->sid = dom_sid_dup(creds, &sid); if (!creds->sid) { status = NT_STATUS_NO_MEMORY; goto out; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 40790cfc18..994fc7934b 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -5473,7 +5473,7 @@ NTSTATUS _samr_GetMembersInAlias(struct pipes_struct *p, } for (i = 0; i < num_sids; i++) { - sids[i].sid = sid_dup_talloc(p->mem_ctx, &pdb_sids[i]); + sids[i].sid = dom_sid_dup(p->mem_ctx, &pdb_sids[i]); if (!sids[i].sid) { TALLOC_FREE(pdb_sids); return NT_STATUS_NO_MEMORY; @@ -6736,7 +6736,7 @@ NTSTATUS _samr_RidToSid(struct pipes_struct *p, return NT_STATUS_NO_MEMORY; } - *r->out.sid = sid_dup_talloc(p->mem_ctx, &sid); + *r->out.sid = dom_sid_dup(p->mem_ctx, &sid); if (!*r->out.sid) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index cba555ac3a..17314d23e9 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -30,6 +30,7 @@ #include "rpc_client/cli_samr.h" #include "rpc_client/init_samr.h" #include "rpc_client/init_lsa.h" +#include "../libcli/security/dom_sid.h" extern struct dom_sid domain_sid; @@ -668,7 +669,7 @@ static NTSTATUS cmd_samr_query_useraliases(struct rpc_pipe_client *cli, } for (i=0; i<num_sids; i++) { - sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sids[i]); + sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sids[i]); if (!sid_array.sids[i].sid) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index c9bb96c18c..59c52bc270 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -236,7 +236,7 @@ NTSTATUS rpc_vampire_internals(struct net_context *c, } /* fetch builtin */ - ctx->domain_sid = sid_dup_talloc(mem_ctx, &global_sid_Builtin); + ctx->domain_sid = dom_sid_dup(mem_ctx, &global_sid_Builtin); ctx->domain_sid_str = sid_string_talloc(mem_ctx, ctx->domain_sid); result = libnet_samsync(SAM_DATABASE_BUILTIN, ctx); @@ -319,7 +319,7 @@ NTSTATUS rpc_vampire_ldif_internals(struct net_context *c, } /* fetch builtin */ - ctx->domain_sid = sid_dup_talloc(mem_ctx, &global_sid_Builtin); + ctx->domain_sid = dom_sid_dup(mem_ctx, &global_sid_Builtin); ctx->domain_sid_str = sid_string_talloc(mem_ctx, ctx->domain_sid); status = libnet_samsync(SAM_DATABASE_BUILTIN, ctx); diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index 80f7bb69bf..3ceaa67b7e 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -33,6 +33,7 @@ #include "librpc/gen_ndr/srv_lsa.h" #include "rpc_client/cli_samr.h" #include "rpc_client/cli_lsarpc.h" +#include "../libcli/security/dom_sid.h" /* Query display info for a domain */ NTSTATUS rpc_query_user_list(TALLOC_CTX *mem_ctx, @@ -612,7 +613,7 @@ NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx, } for (i = 0; i < num_query_sids; i++) { - sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sids[total_sids++]); + sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sids[total_sids++]); if (sid_array.sids[i].sid == NULL) { return NT_STATUS_NO_MEMORY; } @@ -739,7 +740,7 @@ NTSTATUS rpc_lookup_groupmem(TALLOC_CTX *mem_ctx, struct lsa_SidPtr sid_ptr; struct samr_Ids rids_query; - sid_ptr.sid = sid_dup_talloc(mem_ctx, group_sid); + sid_ptr.sid = dom_sid_dup(mem_ctx, group_sid); if (sid_ptr.sid == NULL) { return NT_STATUS_NO_MEMORY; } |