diff options
author | Günther Deschner <gd@samba.org> | 2008-11-05 14:28:17 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-10 21:46:30 +0100 |
commit | 61391d0ade10f79fb4d2a245b942ee93fa11a6d2 (patch) | |
tree | c1f77661ecc2fd4ae0db0ffb61e3afbe3d61fd42 /source4/libnet/libnet_join.c | |
parent | 2efec54b8d8ae37b57747459ac7aa3c7a69cb6cc (diff) | |
download | samba-61391d0ade10f79fb4d2a245b942ee93fa11a6d2.tar.gz samba-61391d0ade10f79fb4d2a245b942ee93fa11a6d2.tar.xz samba-61391d0ade10f79fb4d2a245b942ee93fa11a6d2.zip |
s4-samr: merge samr_LookupNames from s3 idl. (fixme: python)
Guenther
Diffstat (limited to 'source4/libnet/libnet_join.c')
-rw-r--r-- | source4/libnet/libnet_join.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index e18797c3d59..e6664b24631 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -444,6 +444,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru struct samr_OpenDomain od; struct policy_handle d_handle; struct samr_LookupNames ln; + struct samr_Ids rids, types; struct samr_OpenUser ou; struct samr_CreateUser2 cu; struct policy_handle *u_handle = NULL; @@ -612,6 +613,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru ln.in.domain_handle = &d_handle; ln.in.num_names = 1; ln.in.names = talloc_array(tmp_ctx, struct lsa_String, 1); + ln.out.rids = &rids; + ln.out.types = &types; if (!ln.in.names) { r->out.error_string = NULL; talloc_free(tmp_ctx); @@ -631,10 +634,10 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru } /* check if we got one RID for the user */ - if (ln.out.rids.count != 1) { + if (ln.out.rids->count != 1) { r->out.error_string = talloc_asprintf(mem_ctx, "samr_LookupNames for [%s] returns %d RIDs", - r->in.account_name, ln.out.rids.count); + r->in.account_name, ln.out.rids->count); talloc_free(tmp_ctx); return NT_STATUS_INVALID_PARAMETER; } @@ -643,7 +646,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru ZERO_STRUCTP(u_handle); ou.in.domain_handle = &d_handle; ou.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; - ou.in.rid = ln.out.rids.ids[0]; + ou.in.rid = ln.out.rids->ids[0]; rid = ou.in.rid; ou.out.user_handle = u_handle; |