Use every
authorGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 17:21:52 +0000 (18:21 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 17:21:52 +0000 (18:21 +0100)
source/libnet/libnet_join.c
source/utils/net_domain.c

index e6fcc76d6ca5ebc12ba5d7ffcf3c0227949a3f8b..996b9e64f9dd6f1ee329b82c5432eb94a15ca063 100644 (file)
@@ -831,11 +831,12 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
        char *acct_name;
        uint32 user_rid;
-       SAM_USERINFO_CTR ctr, *qctr = NULL;
+       SAM_USERINFO_CTR ctr;
        SAM_USER_INFO_16 p16;
        struct lsa_String lsa_acct_name;
        struct samr_Ids user_rids;
        struct samr_Ids name_types;
+       union samr_UserInfo *info = NULL;
 
        status = cli_full_connection(&cli, NULL,
                                     r->in.dc_name,
@@ -904,8 +905,10 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-       status = rpccli_samr_query_userinfo(pipe_hnd, mem_ctx,
-                                           &user_pol, 16, &qctr);
+       status = rpccli_samr_QueryUserInfo(pipe_hnd, mem_ctx,
+                                          &user_pol,
+                                          16,
+                                          &info);
        if (!NT_STATUS_IS_OK(status)) {
                rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
                goto done;
@@ -915,7 +918,7 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
        ctr.switch_value = 16;
        ctr.info.id16 = &p16;
 
-       p16.acb_info = qctr->info.id16->acb_info | ACB_DISABLED;
+       p16.acb_info = info->info16.acct_flags | ACB_DISABLED;
 
        status = rpccli_samr_set_userinfo2(pipe_hnd, mem_ctx, &user_pol, 16,
                                           &cli->user_session_key, &ctr);
index c545fd9160ae8490e837def6dce0242529af153c..820b3ae79289382e49fbd216ba7d0c73211ad6ed 100644 (file)
@@ -57,11 +57,12 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
        char *acct_name;
        uint32 user_rid;
-       SAM_USERINFO_CTR ctr, *qctr = NULL;
+       SAM_USERINFO_CTR ctr;
        SAM_USER_INFO_16 p16;
        struct lsa_String lsa_acct_name;
        struct samr_Ids user_rids;
        struct samr_Ids name_types;
+       union samr_UserInfo *info = NULL;
 
        /* Open the domain */
        
@@ -123,7 +124,10 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
        
        /* Get user info */
 
-       status = rpccli_samr_query_userinfo(pipe_hnd, mem_ctx, &user_pol, 16, &qctr);
+       status = rpccli_samr_QueryUserInfo(pipe_hnd, mem_ctx,
+                                          &user_pol,
+                                          16,
+                                          &info);
        if ( !NT_STATUS_IS_OK(status) ) {
                rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
                goto done;
@@ -135,7 +139,7 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
        ctr.switch_value = 16;
        ctr.info.id16 = &p16;
 
-       p16.acb_info = qctr->info.id16->acb_info | ACB_DISABLED;
+       p16.acb_info = info->info16.acct_flags | ACB_DISABLED;
 
        status = rpccli_samr_set_userinfo2(pipe_hnd, mem_ctx, &user_pol, 16, 
                                        &cli->user_session_key, &ctr);