samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
authorGünther Deschner <gd@samba.org>
Thu, 7 Oct 2010 11:01:29 +0000 (13:01 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 7 Oct 2010 12:04:32 +0000 (12:04 +0000)
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104

librpc/idl/samr.idl
source3/lib/netapi/group.c
source3/rpc_server/srv_samr_nt.c
source3/rpcclient/cmd_samr.c
source3/utils/net_rpc.c
source3/winbindd/winbindd_msrpc.c
source3/winbindd/winbindd_rpc.c
source4/rpc_server/samr/dcesrv_samr.c
source4/torture/rpc/samr.c
source4/torture/rpc/samr_accessmask.c

index f54d62609fa5399ff4baf8e54f4ccc7f67ff772a..ee9ab7995de5055019d3051134e28c0525a55a50 100644 (file)
@@ -658,12 +658,12 @@ import "misc.idl", "lsa.idl", "security.idl";
        typedef struct {
                uint32 count;
                [size_is(count)] uint32 *rids;
-               [size_is(count)] uint32 *types;
-       } samr_RidTypeArray;
+               [size_is(count)] samr_GroupAttrs *attributes;
+       } samr_RidAttrArray;
 
        NTSTATUS samr_QueryGroupMember(
                [in,ref]  policy_handle *group_handle,
-               [out,ref] samr_RidTypeArray **rids
+               [out,ref] samr_RidAttrArray **rids
                );
 
 
index 9b9d8f0855a1aee562b5f1ddda47779549b1787c..bf8d1667d61827e8687d98f42d75c62be563e5d9 100644 (file)
@@ -234,7 +234,7 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
        struct samr_Ids rids;
        struct samr_Ids types;
        union samr_GroupInfo *info = NULL;
-       struct samr_RidTypeArray *rid_array = NULL;
+       struct samr_RidAttrArray *rid_array = NULL;
 
        ZERO_STRUCT(connect_handle);
        ZERO_STRUCT(domain_handle);
@@ -1260,7 +1260,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
        struct lsa_String lsa_account_name;
        struct dom_sid2 *domain_sid = NULL;
        struct samr_Ids group_rids, name_types;
-       struct samr_RidTypeArray *rid_array = NULL;
+       struct samr_RidAttrArray *rid_array = NULL;
        struct lsa_Strings names;
        struct samr_Ids member_types;
 
@@ -1408,7 +1408,7 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
        union samr_GroupInfo *group_info = NULL;
        struct samr_Ids user_rids, name_types;
        struct samr_Ids group_rids, group_types;
-       struct samr_RidTypeArray *rid_array = NULL;
+       struct samr_RidAttrArray *rid_array = NULL;
        struct lsa_String *lsa_names = NULL;
 
        uint32_t *add_rids = NULL;
index 1a94a1ed8fb36a4cabc7a175a65a613c7f271b03..c8c5572b57537c0fcd07cb40a7c5848b9c78f514 100644 (file)
@@ -5500,7 +5500,7 @@ NTSTATUS _samr_QueryGroupMember(struct pipes_struct *p,
        uint32 *attr=NULL;
 
        NTSTATUS status;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
 
        ginfo = policy_handle_find(p, r->in.group_handle,
                                   SAMR_GROUP_ACCESS_GET_MEMBERS, NULL,
@@ -5509,7 +5509,7 @@ NTSTATUS _samr_QueryGroupMember(struct pipes_struct *p,
                return status;
        }
 
-       rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidTypeArray);
+       rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidAttrArray);
        if (!rids) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -5548,7 +5548,7 @@ NTSTATUS _samr_QueryGroupMember(struct pipes_struct *p,
        }
 
        rids->count = num_members;
-       rids->types = attr;
+       rids->attributes = attr;
        rids->rids = rid;
 
        *r->out.rids = rids;
index 17314d23e923c1360b49afcd608e738fadfb34df..7730e65c1218cf7ef3f634beac6ff27bf5e3789e 100644 (file)
@@ -722,7 +722,7 @@ static NTSTATUS cmd_samr_query_groupmem(struct rpc_pipe_client *cli,
        uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
        int i;
        unsigned int old_timeout;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
 
        if ((argc < 2) || (argc > 3)) {
                printf("Usage: %s rid [access mask]\n", argv[0]);
@@ -774,7 +774,7 @@ static NTSTATUS cmd_samr_query_groupmem(struct rpc_pipe_client *cli,
 
        for (i = 0; i < rids->count; i++) {
                printf("\trid:[0x%x] attr:[0x%x]\n", rids->rids[i],
-                      rids->types[i]);
+                      rids->attributes[i]);
        }
 
        rpccli_samr_Close(cli, mem_ctx, &group_pol);
index 96b3626391bef8afd7b62f981c039e7875ff85cc..7c49645cfc665d6869fd579266005619425a16e3 100644 (file)
@@ -1511,7 +1511,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
        bool group_is_primary = false;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
        uint32_t group_rid;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
        /* char **names; */
        int i;
        /* struct samr_RidWithAttribute *user_gids; */
@@ -2512,7 +2512,7 @@ static NTSTATUS rpc_list_group_members(struct net_context *c,
        struct policy_handle group_pol;
        uint32 num_members, *group_rids;
        int i;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
        struct lsa_Strings names;
        struct samr_Ids types;
 
index 4bfede5ea0521d8bdfff348fed2ad2457dfedb35..500c279ff3452e2816e17ea930b991b0dba182c8 100644 (file)
@@ -618,7 +618,7 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
        unsigned int j, r;
        struct rpc_pipe_client *cli;
        unsigned int orig_timeout;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
 
        DEBUG(3,("msrpc_lookup_groupmem: %s sid=%s\n", domain->name,
                  sid_string_dbg(group_sid)));
index 3ceaa67b7e1e1c7e8d7873de7f39dd2d27a56dae..0a643f5644d04d1d62b952d3788f30b2e8ac9546 100644 (file)
@@ -693,7 +693,7 @@ NTSTATUS rpc_lookup_groupmem(TALLOC_CTX *mem_ctx,
        switch(type) {
        case SID_NAME_DOM_GRP:
        {
-               struct samr_RidTypeArray *rids = NULL;
+               struct samr_RidAttrArray *rids = NULL;
 
                status = rpccli_samr_OpenGroup(samr_pipe,
                                               mem_ctx,
index e9ed2efb869976d1367068f2d2c37611705a6cf8..3a73c7a6fe2c40ee105c718ad19e90b99f63d20b 100644 (file)
@@ -2118,7 +2118,7 @@ static NTSTATUS dcesrv_samr_QueryGroupMember(struct dcesrv_call_state *dce_call,
        struct dcesrv_handle *h;
        struct samr_account_state *a_state;
        struct samr_domain_state *d_state;
-       struct samr_RidTypeArray *array;
+       struct samr_RidAttrArray *array;
        unsigned int i, num_members;
        struct dom_sid *members;
        NTSTATUS status;
@@ -2135,7 +2135,7 @@ static NTSTATUS dcesrv_samr_QueryGroupMember(struct dcesrv_call_state *dce_call,
                return status;
        }
 
-       array = talloc_zero(mem_ctx, struct samr_RidTypeArray);
+       array = talloc_zero(mem_ctx, struct samr_RidAttrArray);
        if (array == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -2151,8 +2151,8 @@ static NTSTATUS dcesrv_samr_QueryGroupMember(struct dcesrv_call_state *dce_call,
                return NT_STATUS_NO_MEMORY;
        }
 
-       array->types = talloc_array(array, uint32_t, num_members);
-       if (array->types == NULL) {
+       array->attributes = talloc_array(array, uint32_t, num_members);
+       if (array->attributes == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -2168,9 +2168,9 @@ static NTSTATUS dcesrv_samr_QueryGroupMember(struct dcesrv_call_state *dce_call,
                        return status;
                }
 
-               array->types[array->count] = SE_GROUP_MANDATORY |
-                                            SE_GROUP_ENABLED_BY_DEFAULT |
-                                            SE_GROUP_ENABLED;
+               array->attributes[array->count] = SE_GROUP_MANDATORY |
+                                                 SE_GROUP_ENABLED_BY_DEFAULT |
+                                                 SE_GROUP_ENABLED;
                array->count++;
        }
 
index 7212f1eb7dc65af2c71b55f41b8455e868de9fc6..ad61692e0366bfa5f90bca47f9e65b23a45f4952 100644 (file)
@@ -5616,7 +5616,7 @@ static bool test_QueryGroupMember(struct dcerpc_binding_handle *b,
                                  struct policy_handle *handle)
 {
        struct samr_QueryGroupMember r;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
        bool ret = true;
 
        torture_comment(tctx, "Testing QueryGroupMember\n");
@@ -7010,7 +7010,7 @@ static bool test_AddGroupMember(struct dcerpc_binding_handle *b,
        struct samr_AddGroupMember r;
        struct samr_DeleteGroupMember d;
        struct samr_QueryGroupMember q;
-       struct samr_RidTypeArray *rids = NULL;
+       struct samr_RidAttrArray *rids = NULL;
        struct samr_SetMemberAttributesOfGroup s;
        uint32_t rid;
        bool found_member = false;
index 63f99f90056bf091de7534a75906522de8b469b9..e6f7b05a968cd24454605ea2233ad0fb6d1162ec 100644 (file)
@@ -812,7 +812,7 @@ static bool test_samr_group(struct torture_context *tctx,
        }
        {
                struct samr_QueryGroupMember r;
-               struct samr_RidTypeArray *rids;
+               struct samr_RidAttrArray *rids;
 
                r.in.group_handle = &group_handle;
                r.out.rids = &rids;