summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-13 14:32:16 +0200
committerGünther Deschner <gd@samba.org>2011-04-13 22:23:59 +0200
commit9824e2e5ee336aa6c72fb121935f364f3d8fea6e (patch)
tree62934cf0ac9424c4eea8270499f0c8f2673c18d5
parentd2d976d8351c4bf7557a7bd8509db4a644de913d (diff)
downloadsamba-9824e2e5ee336aa6c72fb121935f364f3d8fea6e.tar.gz
s3-rpc_client: add and use rpc_client/rpc_client.h.
Guenther
-rw-r--r--source3/include/client.h25
-rw-r--r--source3/include/ntdomain.h2
-rw-r--r--source3/lib/netapi/group.c1
-rw-r--r--source3/lib/netapi/localgroup.c1
-rw-r--r--source3/lib/netapi/samr.c1
-rw-r--r--source3/libads/ldap_printer.c1
-rw-r--r--source3/libnet/libnet_samsync.c1
-rw-r--r--source3/libsmb/libsmb_xattr.c1
-rw-r--r--source3/printing/nt_printing_migrate.c1
-rw-r--r--source3/printing/printspoolss.c1
-rw-r--r--source3/rpc_client/cli_lsarpc.c1
-rw-r--r--source3/rpc_client/cli_netlogon.c1
-rw-r--r--source3/rpc_client/cli_pipe.h2
-rw-r--r--source3/rpc_client/cli_samr.c1
-rw-r--r--source3/rpc_client/cli_spoolss.c1
-rw-r--r--source3/rpc_client/rpc_client.h55
-rw-r--r--source3/rpc_server/srv_pipe_register.c1
-rw-r--r--source3/smbd/lanman.c1
-rw-r--r--source3/smbd/reply.c1
-rw-r--r--source3/utils/net_printing.c1
-rw-r--r--source3/utils/net_rpc_audit.c1
-rw-r--r--source3/utils/net_rpc_printer.c1
-rw-r--r--source3/utils/net_rpc_registry.c1
-rw-r--r--source3/utils/net_rpc_rights.c1
-rw-r--r--source3/utils/net_rpc_service.c1
-rw-r--r--source3/utils/net_rpc_sh_acct.c1
-rw-r--r--source3/winbindd/winbindd_ads.c1
-rw-r--r--source3/winbindd/winbindd_rpc.c1
-rw-r--r--source3/winbindd/winbindd_samr.c1
29 files changed, 84 insertions, 25 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index a4c52c3a06..671640b8b4 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 8fb1248919..077924d6f4 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 5507f71d30..4295d9f7bb 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 ce9df27181..51f4e1d745 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 647ae65326..544698004a 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 251dfb0a81..235ef7f954 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 6d371f4afd..1141bed730 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 155a6b9741..af2c56ad40 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 c62d1c8de5..55e49c973b 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 352fcb8b6b..2f6f19c3da 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 be499238c3..e599571181 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 8dc232f412..bd3232d2cd 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 30c1bad797..81c382f5a8 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 19dd25578b..5baf3e6315 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 f4cea97064..831da85205 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 0000000000..6561b28b7c
--- /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 <http://www.gnu.org/licenses/>.
+ */
+
+
+#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 3753596a2b..a6d654277e 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 a04f062274..13297c0222 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 5697594ac6..cc02ae29dc 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 8019d4ff61..11c87bb5b4 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 cd6d1da8c3..8179b70d53 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 4073e0e2a9..7a22587174 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 190ab05819..31f4e3ec5f 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 02027f8d92..a2847749b7 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 f1cd2a6b0d..c5d6954dfc 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 6f5604e315..6f85be4f88 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 4e8045731a..dde8e3f53d 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 ac17bc90c2..ed7d994ca9 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 a1c464013d..f24a14391b 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"