Added arg to querygroupinfo.
authorTim Potter <tpot@samba.org>
Mon, 14 May 2001 03:51:39 +0000 (03:51 +0000)
committerTim Potter <tpot@samba.org>
Mon, 14 May 2001 03:51:39 +0000 (03:51 +0000)
(This used to be commit ab58fdf77a12d101f5ac6b6702cd8ed9dc2c7d55)

source3/rpcclient/cmd_samr.c

index d399f911a9343ad2f92ab37ab962d3762836473f..8ab1bf9462065d1186ec219481ede9b6102e315c 100644 (file)
@@ -282,14 +282,16 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
        GROUP_INFO_CTR group_ctr;
        fstring                 server; 
        TALLOC_CTX              *mem_ctx;
+       uint32 group_rid;
        
-       if (argc != 1) {
-               printf("Usage: %s\n", argv[0]);
+       if (argc != 2) {
+               printf("Usage: %s rid\n", argv[0]);
                return 0;
        }
 
-       if (!(mem_ctx=talloc_init()))
-       {
+       group_rid = atoi(argv[1]);
+
+       if (!(mem_ctx=talloc_init())) {
                DEBUG(0,("cmd_samr_query_group: talloc_init returned NULL!\n"));
                return NT_STATUS_UNSUCCESSFUL;
        }
@@ -324,7 +326,7 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
 
        if ((result = cli_samr_open_group(cli, mem_ctx, &domain_pol,
                                          MAXIMUM_ALLOWED_ACCESS,
-                                         0x202, &group_pol))
+                                         group_rid, &group_pol))
            != NT_STATUS_NOPROBLEMO) {
                goto done;
        }
@@ -333,8 +335,8 @@ static uint32 cmd_samr_query_group(struct cli_state *cli, int argc, char **argv)
 
        ZERO_STRUCT(group_ctr);
 
-       if ((result = cli_samr_query_groupinfo(cli, mem_ctx, &group_pol, info_level,
-                                              &group_ctr)) 
+       if ((result = cli_samr_query_groupinfo(cli, mem_ctx, &group_pol, 
+                                              info_level, &group_ctr)) 
            != NT_STATUS_NOPROBLEMO) {
                goto done;
        }
@@ -902,4 +904,3 @@ struct cmd_set samr_commands[] = {
 
        { NULL, NULL, NULL }
 };
-