ADS_STATUS status;
LDAPMessage *res = NULL;
char *dn = NULL;
+ struct dom_sid sid;
if (!r->in.machine_name) {
return ADS_ERROR(LDAP_NO_MEMORY);
r->out.set_encryption_types = 0;
}
+ if (!ads_pull_sid(r->in.ads, res, "objectSid", &sid)) {
+ status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ goto done;
+ }
+
+ dom_sid_split_rid(mem_ctx, &sid, NULL, &r->out.account_rid);
done:
ads_msgfree(r->in.ads, res);
TALLOC_FREE(dn);
NTSTATUS status = NT_STATUS_UNSUCCESSFUL, result;
char *acct_name;
struct lsa_String lsa_acct_name;
- uint32_t user_rid;
uint32_t acct_flags = ACB_WSTRUST;
struct samr_Ids user_rids;
struct samr_Ids name_types;
access_desired,
&user_pol,
&access_granted,
- &user_rid,
+ &r->out.account_rid,
&result);
if (!NT_STATUS_IS_OK(status)) {
goto done;
goto done;
}
- user_rid = user_rids.ids[0];
+ r->out.account_rid = user_rids.ids[0];
/* Open handle on user */
status = dcerpc_samr_OpenUser(b, mem_ctx,
&domain_pol,
SEC_FLAG_MAXIMUM_ALLOWED,
- user_rid,
+ r->out.account_rid,
&user_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
[out] boolean8 domain_is_ad,
[out] uint32 set_encryption_types,
[out] string krb5_salt,
- [out,unique] netr_DsRGetDCNameInfo *dcinfo
+ [out,unique] netr_DsRGetDCNameInfo *dcinfo,
+ [out] uint32 account_rid
);
[nopush,nopull,noopnum] WERROR libnet_UnjoinCtx(