cli_netlogon: Rename rpccli_create_netlogon_creds_with_creds
authorVolker Lendecke <vl@samba.org>
Wed, 6 Sep 2017 15:23:47 +0000 (17:23 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 16 Sep 2017 06:36:17 +0000 (08:36 +0200)
This creates a context with access to a credentials, not credentials

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libnet/libnet_join.c
source3/rpc_client/cli_netlogon.c
source3/rpc_client/cli_netlogon.h
source3/rpc_client/cli_pipe_schannel.c
source3/rpcclient/rpcclient.c
source3/winbindd/winbindd_cm.c

index a4696698d7d7ed7ddaf2f0f6b52ae90c0e104c19..e588001d7d6156566306fd0173805688a90e1876 100644 (file)
@@ -1166,7 +1166,7 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
        cli_credentials_set_password(cli_creds, r->in.admin_password,
                                     CRED_SPECIFIED);
 
-       status = rpccli_create_netlogon_creds_with_creds(
+       status = rpccli_create_netlogon_creds_ctx(
                cli_creds, netlogon_pipe->desthost, r->in.msg_ctx,
                frame, &netlogon_creds);
        if (!NT_STATUS_IS_OK(status)) {
@@ -1617,11 +1617,11 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx,
                return status;
        }
 
-       status = rpccli_create_netlogon_creds_with_creds(cli_creds,
-                                                        dc_name,
-                                                        msg_ctx,
-                                                        frame,
-                                                        &netlogon_creds);
+       status = rpccli_create_netlogon_creds_ctx(cli_creds,
+                                                 dc_name,
+                                                 msg_ctx,
+                                                 frame,
+                                                 &netlogon_creds);
        if (!NT_STATUS_IS_OK(status)) {
                cli_shutdown(cli);
                TALLOC_FREE(frame);
index 9d245b8be7d2417917165e6cc3b53b9959e90cbe..75234a6799c48f4d6d6ab542748bb6b5748c297c 100644 (file)
@@ -127,11 +127,12 @@ static NTSTATUS rpccli_create_netlogon_creds(
        return NT_STATUS_OK;
 }
 
-NTSTATUS rpccli_create_netlogon_creds_with_creds(struct cli_credentials *creds,
-                                                const char *server_computer,
-                                                struct messaging_context *msg_ctx,
-                                                TALLOC_CTX *mem_ctx,
-                                                struct netlogon_creds_cli_context **netlogon_creds)
+NTSTATUS rpccli_create_netlogon_creds_ctx(
+       struct cli_credentials *creds,
+       const char *server_computer,
+       struct messaging_context *msg_ctx,
+       TALLOC_CTX *mem_ctx,
+       struct netlogon_creds_cli_context **netlogon_creds)
 {
        enum netr_SchannelType sec_chan_type;
        const char *server_netbios_domain;
index a6fcf1cec4f7fa365ca10979c3beb013e6bf1a78..62cdc63e77e76dda23dfc0cb01ac1763c4d24e35 100644 (file)
@@ -33,11 +33,12 @@ struct dcerpc_binding_handle;
 /* The following definitions come from rpc_client/cli_netlogon.c  */
 
 NTSTATUS rpccli_pre_open_netlogon_creds(void);
-NTSTATUS rpccli_create_netlogon_creds_with_creds(struct cli_credentials *creds,
-                                                const char *server_computer,
-                                                struct messaging_context *msg_ctx,
-                                                TALLOC_CTX *mem_ctx,
-                                                struct netlogon_creds_cli_context **netlogon_creds);
+NTSTATUS rpccli_create_netlogon_creds_ctx(
+       struct cli_credentials *creds,
+       const char *server_computer,
+       struct messaging_context *msg_ctx,
+       TALLOC_CTX *mem_ctx,
+       struct netlogon_creds_cli_context **netlogon_creds);
 NTSTATUS rpccli_setup_netlogon_creds_with_creds(struct cli_state *cli,
                                                enum dcerpc_transport_t transport,
                                                struct netlogon_creds_cli_context *netlogon_creds,
index 1790247e04e49937437af6859bfa38a4771666d7..0a1dd79b98691d45db03e7b6bb2b7bc2973a79dd 100644 (file)
@@ -62,11 +62,11 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
                return status;
        }
 
-       status = rpccli_create_netlogon_creds_with_creds(cli_creds,
-                                                        dc_name,
-                                                        msg_ctx,
-                                                        frame,
-                                                        &netlogon_creds);
+       status = rpccli_create_netlogon_creds_ctx(cli_creds,
+                                                 dc_name,
+                                                 msg_ctx,
+                                                 frame,
+                                                 &netlogon_creds);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(frame);
                return status;
index 269a2a0d34ba17998a7cba61a56e9bd642fe639a..05bbb0b478bae4f3d08966e43f72794febf56b8a 100644 (file)
@@ -803,7 +803,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
                                return ntresult;
                        }
 
-                       ntresult = rpccli_create_netlogon_creds_with_creds(creds,
+                       ntresult = rpccli_create_netlogon_creds_ctx(creds,
                                                        dc_name,
                                                        rpcclient_msg_ctx,
                                                        rpcclient_msg_ctx,
index 316964226d698747780596423d3522f06dd6b127..5fd8f086b873d60191353b962fc3573b0ee9beef 100644 (file)
@@ -3277,11 +3277,11 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
                return NT_STATUS_OK;
        }
 
-       result = rpccli_create_netlogon_creds_with_creds(creds,
-                                                        domain->dcname,
-                                                        msg_ctx,
-                                                        domain,
-                                                        &conn->netlogon_creds_ctx);
+       result = rpccli_create_netlogon_creds_ctx(creds,
+                                                 domain->dcname,
+                                                 msg_ctx,
+                                                 domain,
+                                                 &conn->netlogon_creds_ctx);
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(1, ("rpccli_create_netlogon_creds failed for %s, "
                          "unable to create NETLOGON credentials: %s\n",