libsmb: Give dsgetdcname.c its own header
authorVolker Lendecke <vl@samba.org>
Fri, 5 Jan 2018 13:21:05 +0000 (14:21 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 10 Apr 2018 23:06:39 +0000 (01:06 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/proto.h
source3/lib/netapi/getdc.c
source3/lib/netapi/joindomain.c
source3/lib/netapi/serverinfo.c
source3/libnet/libnet_join.c
source3/libsmb/dsgetdcname.c
source3/libsmb/dsgetdcname.h [new file with mode: 0644]
source3/rpc_server/netlogon/srv_netlog_nt.c
source3/utils/net_lookup.c
source3/utils/net_rpc.c
source3/winbindd/winbindd_dual_srv.c

index 3dab5d7ade6e98e0700c94ad961df0cc934b5643..4c51e4d30599535c0ade5ad97547a7f27189e965 100644 (file)
@@ -676,18 +676,6 @@ NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
 void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
 void flush_negative_conn_cache_for_domain(const char *domain);
 
-/* The following definitions come from libsmb/dsgetdcname.c  */
-
-struct netr_DsRGetDCNameInfo;
-
-NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
-                    struct messaging_context *msg_ctx,
-                    const char *domain_name,
-                    const struct GUID *domain_guid,
-                    const char *site_name,
-                    uint32_t flags,
-                    struct netr_DsRGetDCNameInfo **info);
-
 /* The following definitions come from libsmb/errormap.c  */
 
 NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode);
index 2d47ee458400a7cf397a9148f8d91d8c826d8a2b..d4633752c782b93de991859692b4f2dbb34e5f84 100644 (file)
@@ -24,6 +24,7 @@
 #include "lib/netapi/netapi.h"
 #include "lib/netapi/netapi_private.h"
 #include "lib/netapi/libnetapi.h"
+#include "libsmb/dsgetdcname.h"
 
 /********************************************************************
 ********************************************************************/
index 7d27bd9d0feb006e05a4e8c2ed277d0a98dee1bb..ff2154ba803ec20e3085d9780c738a9e04b748b6 100644 (file)
@@ -29,6 +29,7 @@
 #include "../librpc/gen_ndr/ndr_wkssvc_c.h"
 #include "rpc_client/cli_pipe.h"
 #include "secrets.h"
+#include "libsmb/dsgetdcname.h"
 
 /****************************************************************
 ****************************************************************/
index 2fd7668c682792219cdf54a14afcf7ecee1cd382..7d9cc481c8c52e841670b695406331b1562a38b9 100644 (file)
@@ -26,6 +26,7 @@
 #include "../librpc/gen_ndr/ndr_srvsvc_c.h"
 #include "lib/smbconf/smbconf.h"
 #include "lib/smbconf/smbconf_reg.h"
+#include "libsmb/dsgetdcname.h"
 
 /****************************************************************
 ****************************************************************/
index 5bf0b7fff2df9b370a3c7274a586fe1003dc9fc9..a9405e8d288a15321ee54c195a19d89a5771eafc 100644 (file)
@@ -44,6 +44,7 @@
 #include "libcli/auth/netlogon_creds_cli.h"
 #include "auth/credentials/credentials.h"
 #include "krb5_env.h"
+#include "libsmb/dsgetdcname.h"
 
 /****************************************************************
 ****************************************************************/
index 9864900632400dddb7320cdff41fe0701dd58926..3afe6a85b919f01aa34118ac5d4b223b544677c7 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "libsmb/dsgetdcname.h"
 #include "libsmb/namequery.h"
 #include "libads/sitename_cache.h"
 #include "../librpc/gen_ndr/ndr_netlogon.h"
diff --git a/source3/libsmb/dsgetdcname.h b/source3/libsmb/dsgetdcname.h
new file mode 100644 (file)
index 0000000..0aa06c3
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Copyright (C) Volker Lendecke 2018
+ *
+ * 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 __LIBSMB_DSGETDCNAME_H__
+#define __LIBSMB_DSGETDCNAME_H__
+
+#include "replace.h"
+#include <talloc.h>
+#include "librpc/gen_ndr/misc.h"
+
+struct netr_DsRGetDCNameInfo;
+struct messaging_context;
+
+NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
+                    struct messaging_context *msg_ctx,
+                    const char *domain_name,
+                    const struct GUID *domain_guid,
+                    const char *site_name,
+                    uint32_t flags,
+                    struct netr_DsRGetDCNameInfo **info);
+
+#endif
index 83e68417c767df6514c49893499bcedd3eb787d4..9b9947455ed9e0dfcbea27cde6129b1f7f961ae1 100644 (file)
@@ -47,6 +47,7 @@
 #include "messages.h"
 #include "../lib/tsocket/tsocket.h"
 #include "lib/param/param.h"
+#include "libsmb/dsgetdcname.h"
 
 extern userdom_struct current_user_info;
 
index 4e7a74d1e004aefb627fd0c2c5a57aa6951f2848..05a3dbc6e2bb48971d49ece519262037483e9586 100644 (file)
@@ -25,6 +25,7 @@
 #include "smb_krb5.h"
 #include "../libcli/security/security.h"
 #include "passdb/lookup_sid.h"
+#include "libsmb/dsgetdcname.h"
 
 int net_lookup_usage(struct net_context *c, int argc, const char **argv)
 {
index 52d313edfaae7d91458679c58fa82bb172f6b731..b99a036fca1247eb404b981a7774acdd2aedab72 100644 (file)
@@ -47,6 +47,7 @@
 #include "nsswitch/libwbclient/wbclient.h"
 #include "passdb.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "libsmb/dsgetdcname.h"
 
 static int net_mode_share;
 static NTSTATUS sync_files(struct copy_clistate *cp_clistate, const char *mask);
index 4cea73feaf9eef927dda52e63fdeb87f426f7abe..8cb05f06db6c0c3ceaecc8aacf3ebc0697c7c808 100644 (file)
@@ -35,6 +35,7 @@
 #include "../source4/dsdb/samdb/samdb.h"
 #include "rpc_client/cli_netlogon.h"
 #include "rpc_client/util_netlogon.h"
+#include "libsmb/dsgetdcname.h"
 
 void _wbint_Ping(struct pipes_struct *p, struct wbint_Ping *r)
 {