diff options
-rw-r--r-- | source4/torture/libnet/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/torture/libnet/utils.c b/source4/torture/libnet/utils.c index 312b19483f..486f04451b 100644 --- a/source4/torture/libnet/utils.c +++ b/source4/torture/libnet/utils.c @@ -366,6 +366,7 @@ bool test_group_create(struct torture_context *tctx, struct policy_handle *handle, const char *name, uint32_t *rid) { + uint32_t group_rid; struct lsa_String groupname; struct samr_CreateDomainGroup r; struct policy_handle group_handle; @@ -376,7 +377,9 @@ bool test_group_create(struct torture_context *tctx, r.in.name = &groupname; r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.group_handle = &group_handle; - r.out.rid = rid; + /* use local variable in case caller + * don't care about the group RID */ + r.out.rid = rid ? rid : &group_rid; torture_comment(tctx, "creating group account %s\n", name); |