Fixed up SAM_USERINFO_CTR dynamic stuff in cmd_samr_query_user()
authorTim Potter <tpot@samba.org>
Tue, 15 May 2001 05:02:29 +0000 (05:02 +0000)
committerTim Potter <tpot@samba.org>
Tue, 15 May 2001 05:02:29 +0000 (05:02 +0000)
(This used to be commit 22b760e246f8fcf79daf24542cc35bdf41d1fea7)

source3/rpcclient/cmd_samr.c

index 8ab1bf9462065d1186ec219481ede9b6102e315c..d6d1ff9edb9d956f594269627c780eb11fb59fde 100644 (file)
@@ -146,8 +146,7 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
        BOOL    got_connect_pol = False, 
                got_domain_pol = False,
                got_user_pol = False;
-       SAM_USERINFO_CTR user_ctr;
-       SAM_USER_INFO_21 info_21;
+       SAM_USERINFO_CTR *user_ctr;
        fstring                 server;
        TALLOC_CTX              *mem_ctx;
        uint32 user_rid;
@@ -204,17 +203,14 @@ static uint32 cmd_samr_query_user(struct cli_state *cli, int argc, char **argv)
        got_user_pol = True;
 
        ZERO_STRUCT(user_ctr);
-       ZERO_STRUCT(info_21);
 
-       user_ctr.info.id21 = &info_21;
-
-       if ((result = cli_samr_query_userinfo(cli, mem_ctx, &user_pol, info_level,
-                                             &user_ctr)) 
+       if ((result = cli_samr_query_userinfo(cli, mem_ctx, &user_pol, 
+                                             info_level, &user_ctr)) 
            != NT_STATUS_NOPROBLEMO) {
                goto done;
        }
 
-       display_sam_user_info_21(&info_21);
+       display_sam_user_info_21(user_ctr->info.id21);
 
 done:
        if (got_user_pol) cli_samr_close(cli, mem_ctx, &user_pol);