fixing "addgroupmem" and "enumgroups -m" commands, samr_open_group()
authorLuke Leighton <lkcl@samba.org>
Fri, 4 Dec 1998 22:00:39 +0000 (22:00 +0000)
committerLuke Leighton <lkcl@samba.org>
Fri, 4 Dec 1998 22:00:39 +0000 (22:00 +0000)
needed a flags fields as you get 0x0000 0010 and 0x0000 001f unknown
values for different purposes, no-one's going to tell us what they
are and i don't CARE!
(This used to be commit aabb4b3bc5119ef317b5697ae6fcf5d36c2d474e)

source3/include/proto.h
source3/rpc_client/cli_samr.c
source3/rpcclient/cmd_samr.c

index 49fdda7075e97f2bcc4a6d7a77b45ad322806c66..72effa03c575a0cf857f216e8e19d4eeb1477f49 100644 (file)
@@ -1643,7 +1643,8 @@ BOOL samr_create_dom_alias(struct cli_state *cli,
 BOOL samr_set_aliasinfo(struct cli_state *cli, 
                                POLICY_HND *alias_pol, ALIAS_INFO_CTR *ctr);
 BOOL samr_open_group(struct cli_state *cli, 
-                               POLICY_HND *domain_pol, uint32 rid,
+                               POLICY_HND *domain_pol,
+                               uint32 flags, uint32 rid,
                                POLICY_HND *group_pol);
 BOOL samr_add_groupmem(struct cli_state *cli, 
                                POLICY_HND *group_pol, uint32 rid);
index 9d3cbd22c23f6f711d2c931f18a7304ce7aa6e9c..4fc1c3f5a098fb94dfe002e00159454e3436a732 100644 (file)
@@ -164,7 +164,7 @@ BOOL get_samr_query_groupmem(struct cli_state *cli,
 
        /* send open domain (on group sid) */
        if (!samr_open_group(cli, pol_open_domain,
-                               group_rid,
+                               0x00000010, group_rid,
                                &pol_open_group))
        {
                return False;
@@ -267,7 +267,7 @@ BOOL get_samr_query_groupinfo(struct cli_state *cli,
        /* send open domain (on group sid) */
        if (!samr_open_group(cli,
                                pol_open_domain,
-                               group_rid, &pol_open_group))
+                               0x00000010, group_rid, &pol_open_group))
        {
                return False;
        }
@@ -1067,7 +1067,8 @@ BOOL samr_set_aliasinfo(struct cli_state *cli,
 do a SAMR Open Group
 ****************************************************************************/
 BOOL samr_open_group(struct cli_state *cli, 
-                               POLICY_HND *domain_pol, uint32 rid,
+                               POLICY_HND *domain_pol,
+                               uint32 flags, uint32 rid,
                                POLICY_HND *group_pol)
 {
        prs_struct data;
@@ -1086,7 +1087,7 @@ BOOL samr_open_group(struct cli_state *cli,
        prs_init(&rdata, 0   , 4, SAFETY_MARGIN, True );
 
        /* store the parameters */
-       make_samr_q_open_group(&q_o, domain_pol, 0x0001, rid);
+       make_samr_q_open_group(&q_o, domain_pol, flags, rid);
 
        /* turn parameters into data stream */
        samr_io_q_open_group("", &q_o,  &data, 0);
index ae3ef548c617a50915c3aaf5da73f36a37c56e4c..ac9da8b2ea25d20d9929c2943b3ad7c31cd2ecbd 100644 (file)
@@ -405,7 +405,7 @@ void cmd_sam_add_groupmem(struct client_info *info)
        /* connect to the domain */
        res1 = res ? samr_open_group(smb_cli,
                    &info->dom.samr_pol_open_domain,
-                   group_rid, &group_pol) : False;
+                   0x0000001f, group_rid, &group_pol) : False;
 
        while (next_token(NULL, tmp, NULL, sizeof(tmp)) && res2 && res1)
        {