From: Günther Deschner Date: Wed, 13 Apr 2011 12:32:16 +0000 (+0200) Subject: s3-rpc_client: add and use rpc_client/rpc_client.h. X-Git-Tag: ldb-1.1.0~117 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=9824e2e5ee336aa6c72fb121935f364f3d8fea6e s3-rpc_client: add and use rpc_client/rpc_client.h. Guenther --- diff --git a/source3/include/client.h b/source3/include/client.h index a4c52c3a060..671640b8b46 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -48,31 +48,6 @@ struct print_job_info { time_t t; }; -#include "rpc_client/rpc_transport.h" - -struct dcerpc_binding_handle; - -struct rpc_pipe_client { - struct rpc_pipe_client *prev, *next; - - struct rpc_cli_transport *transport; - struct dcerpc_binding_handle *binding_handle; - - struct ndr_syntax_id abstract_syntax; - struct ndr_syntax_id transfer_syntax; - - char *desthost; - char *srv_name_slash; - - uint16 max_xmit_frag; - uint16 max_recv_frag; - - struct pipe_auth_data *auth; - - /* The following is only non-null on a netlogon client pipe. */ - struct netlogon_creds_CredentialState *dc; -}; - struct cli_state_seqnum { struct cli_state_seqnum *prev, *next; uint16_t mid; diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 8fb1248919f..077924d6f48 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -23,6 +23,8 @@ #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */ #define _NT_DOMAIN_H +#include "librpc/rpc/dcerpc.h" + /* * A bunch of stuff that was put into smb.h * in the NTDOM branch - it didn't belong there. diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index 5507f71d303..4295d9f7bbf 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "rpc_client/init_lsa.h" #include "../libcli/security/security.h" diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index ce9df27181c..51f4e1d7459 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "../librpc/gen_ndr/ndr_lsa_c.h" #include "rpc_client/cli_lsarpc.h" diff --git a/source3/lib/netapi/samr.c b/source3/lib/netapi/samr.c index 647ae653268..544698004a0 100644 --- a/source3/lib/netapi/samr.c +++ b/source3/lib/netapi/samr.c @@ -20,6 +20,7 @@ #include "includes.h" #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "rpc_client/cli_samr.h" #include "rpc_client/init_lsa.h" diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index 251dfb0a815..235ef7f9547 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -19,6 +19,7 @@ #include "includes.h" #include "ads.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "registry.h" diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index 6d371f4afd2..1141bed730b 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -26,6 +26,7 @@ #include "../lib/crypto/crypto.h" #include "../libcli/samsync/samsync.h" #include "../libcli/auth/libcli_auth.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "../librpc/gen_ndr/ndr_netlogon_c.h" #include "../libcli/security/security.h" diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c index 155a6b97417..af2c56ad403 100644 --- a/source3/libsmb/libsmb_xattr.c +++ b/source3/libsmb/libsmb_xattr.c @@ -26,6 +26,7 @@ #include "libsmbclient.h" #include "libsmb_internal.h" #include "../librpc/gen_ndr/ndr_lsa.h" +#include "rpc_client/rpc_client.h" #include "rpc_client/cli_lsarpc.h" #include "../libcli/security/security.h" diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c index c62d1c8de5f..55e49c973b4 100644 --- a/source3/printing/nt_printing_migrate.c +++ b/source3/printing/nt_printing_migrate.c @@ -22,6 +22,7 @@ #include "system/filesys.h" #include "printing/nt_printing_migrate.h" +#include "rpc_client/rpc_client.h" #include "librpc/gen_ndr/ndr_ntprinting.h" #include "librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 352fcb8b6bc..2f6f19c3da7 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -19,6 +19,7 @@ #include "includes.h" #include "printing.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_server/rpc_ncacn_np.h" #include "smbd/smbd.h" diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index be499238c36..e5995711819 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_lsa_c.h" #include "rpc_client/cli_lsarpc.h" #include "rpc_client/init_lsa.h" diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 8dc232f4126..bd3232d2cde 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "rpc_client/rpc_client.h" #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_netlogon_c.h" #include "rpc_client/cli_netlogon.h" diff --git a/source3/rpc_client/cli_pipe.h b/source3/rpc_client/cli_pipe.h index 30c1bad797a..81c382f5a8f 100644 --- a/source3/rpc_client/cli_pipe.h +++ b/source3/rpc_client/cli_pipe.h @@ -23,6 +23,8 @@ #ifndef _CLI_PIPE_H #define _CLI_PIPE_H +#include "rpc_client/rpc_client.h" + struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct rpc_pipe_client *cli, diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 19dd25578ba..5baf3e6315f 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "rpc_client/rpc_client.h" #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "rpc_client/cli_samr.h" diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index f4cea970640..831da85205f 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "ntdomain.h" diff --git a/source3/rpc_client/rpc_client.h b/source3/rpc_client/rpc_client.h new file mode 100644 index 00000000000..6561b28b7c1 --- /dev/null +++ b/source3/rpc_client/rpc_client.h @@ -0,0 +1,55 @@ +/* + * Unix SMB/CIFS implementation. + * + * RPC Pipe client routines + * + * Copyright (c) 2005 Jeremy Allison + * Copyright (c) 2010 Simo Sorce + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + + +#ifndef _RPC_CLIENT_H +#define _RPC_CLIENT_H + +#include "librpc/gen_ndr/dcerpc.h" +#include "librpc/rpc/dcerpc.h" +#include "../librpc/ndr/libndr.h" +#include "rpc_client/rpc_transport.h" + +struct dcerpc_binding_handle; + +struct rpc_pipe_client { + struct rpc_pipe_client *prev, *next; + + struct rpc_cli_transport *transport; + struct dcerpc_binding_handle *binding_handle; + + struct ndr_syntax_id abstract_syntax; + struct ndr_syntax_id transfer_syntax; + + char *desthost; + char *srv_name_slash; + + uint16 max_xmit_frag; + uint16 max_recv_frag; + + struct pipe_auth_data *auth; + + /* The following is only non-null on a netlogon client pipe. */ + struct netlogon_creds_CredentialState *dc; +}; + +#endif /* _RPC_CLIENT_H */ diff --git a/source3/rpc_server/srv_pipe_register.c b/source3/rpc_server/srv_pipe_register.c index 3753596a2b1..a6d654277ed 100644 --- a/source3/rpc_server/srv_pipe_register.c +++ b/source3/rpc_server/srv_pipe_register.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "librpc/rpc/dcerpc.h" #include "srv_pipe_internal.h" #undef DBGC_CLASS diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index a04f0622747..13297c02221 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -28,6 +28,7 @@ #include "includes.h" #include "smbd/smbd.h" #include "smbd/globals.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 5697594ac6a..cc02ae29dc3 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -30,6 +30,7 @@ #include "smbd/smbd.h" #include "smbd/globals.h" #include "fake_file.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "rpc_client/init_spoolss.h" diff --git a/source3/utils/net_printing.c b/source3/utils/net_printing.c index 8019d4ff612..11c87bb5b4f 100644 --- a/source3/utils/net_printing.c +++ b/source3/utils/net_printing.c @@ -22,6 +22,7 @@ #include "includes.h" #include "system/filesys.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "librpc/gen_ndr/ndr_ntprinting.h" #include "librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c index cd6d1da8c3d..8179b70d53b 100644 --- a/source3/utils/net_rpc_audit.c +++ b/source3/utils/net_rpc_audit.c @@ -18,6 +18,7 @@ #include "includes.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_lsa_c.h" #include "rpc_client/cli_lsarpc.h" diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 4073e0e2a95..7a225871744 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -19,6 +19,7 @@ #include "includes.h" #include "system/filesys.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "rpc_client/init_spoolss.h" diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 190ab05819c..31f4e3ec5fd 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -19,6 +19,7 @@ #include "includes.h" #include "system/filesys.h" +#include "rpc_client/rpc_client.h" #include "registry.h" #include "utils/net.h" #include "utils/net_registry_util.h" diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index 02027f8d925..a2847749b70 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -19,6 +19,7 @@ */ #include "includes.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_lsa_c.h" #include "rpc_client/cli_lsarpc.h" #include "rpc_client/init_lsa.h" diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c index f1cd2a6b0d9..c5d6954dfcf 100644 --- a/source3/utils/net_rpc_service.c +++ b/source3/utils/net_rpc_service.c @@ -18,6 +18,7 @@ #include "includes.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_svcctl.h" #include "../librpc/gen_ndr/ndr_svcctl_c.h" diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c index 6f5604e3151..6f85be4f88f 100644 --- a/source3/utils/net_rpc_sh_acct.c +++ b/source3/utils/net_rpc_sh_acct.c @@ -18,6 +18,7 @@ */ #include "includes.h" #include "utils/net.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "../libcli/security/security.h" diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 4e8045731ac..dde8e3f53d2 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -23,6 +23,7 @@ #include "includes.h" #include "winbindd.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_netlogon_c.h" #include "../libds/common/flags.h" #include "ads.h" diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index ac17bc90c2f..ed7d994ca93 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -27,6 +27,7 @@ #include "winbindd.h" #include "winbindd_rpc.h" +#include "rpc_client/rpc_client.h" #include "librpc/gen_ndr/ndr_samr_c.h" #include "librpc/gen_ndr/srv_samr.h" #include "librpc/gen_ndr/ndr_lsa_c.h" diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index a1c464013dd..f24a14391b6 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -27,6 +27,7 @@ #include "winbindd.h" #include "winbindd_rpc.h" +#include "rpc_client/rpc_client.h" #include "../librpc/gen_ndr/ndr_samr_c.h" #include "rpc_client/cli_samr.h" #include "../librpc/gen_ndr/srv_samr.h"