libads: Give krb5_errs.c its own header
authorVolker Lendecke <vl@samba.org>
Fri, 23 Nov 2018 11:34:50 +0000 (12:34 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 27 Nov 2018 06:13:14 +0000 (07:13 +0100)
The protos were declared in lib/krb5_wrap but the functions are not
available there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
12 files changed:
lib/krb5_wrap/krb5_samba.h
source3/libads/ads_status.c
source3/libads/authdata.c
source3/libads/kerberos.c
source3/libads/krb5_errs.c
source3/libads/krb5_errs.h [new file with mode: 0644]
source3/libnet/libnet_dssync.c
source3/libnet/libnet_dssync_keytab.c
source3/libsmb/cliconnect.c
source3/passdb/machine_account_secrets.c
source3/winbindd/winbindd_cred_cache.c
source3/winbindd/winbindd_pam.c

index 8305c1f77af08a25d1a14342067762e2703aa4f0..fb3cb5f2ad89ba192bd477404e2b6ef82725f5e2 100644 (file)
@@ -188,9 +188,6 @@ krb5_error_code smb_krb5_renew_ticket(const char *ccache_string, const char *cli
 krb5_error_code smb_krb5_gen_netbios_krb5_address(smb_krb5_addresses **kerb_addr,
                                                  const char *netbios_name);
 krb5_error_code smb_krb5_free_addresses(krb5_context context, smb_krb5_addresses *addr);
-NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error);
-krb5_error_code nt_status_to_krb5(NTSTATUS nt_status);
-
 krb5_enctype smb_krb5_kt_get_enctype_from_entry(krb5_keytab_entry *kt_entry);
 
 krb5_error_code smb_krb5_enctype_to_string(krb5_context context,
index 70569949aeb2fa1dcfa0d448f6b9ab83fae44d3d..fb3646386ca2f494ff0f92fc36a42b2fa2d7925e 100644 (file)
@@ -25,6 +25,7 @@
 #include "system/gssapi.h"
 #include "smb_ldap.h"
 #include "libads/ads_status.h"
+#include "krb5_errs.h"
 
 /*
   build a ADS_STATUS structure
index d8a6487dc27ddd3fde8494649dcd3091268d8758..86a1be71bf986d3ba33566120a40143a02ebf7b2 100644 (file)
@@ -32,6 +32,7 @@
 #include "auth/gensec/gensec.h"
 #include "auth/gensec/gensec_internal.h" /* TODO: remove this */
 #include "../libcli/auth/spnego.h"
+#include "krb5_errs.h"
 
 #ifdef HAVE_KRB5
 
index 58f38cdc55de39090a8daa2a0e572c7e33c78bd4..418e5a7224361fb59a43f1deeded78a82871f726 100644 (file)
@@ -31,6 +31,7 @@
 #include "secrets.h"
 #include "../lib/tsocket/tsocket.h"
 #include "lib/util/asn1.h"
+#include "krb5_errs.h"
 
 #ifdef HAVE_KRB5
 
index 8eb5d8247b119a21f37ad77e6c8bbc75eaa0b45d..0c2ada59966bc6cb5fc62412745ac7a15a5844f5 100644 (file)
@@ -20,6 +20,8 @@
 #include "includes.h"
 #include "smb_krb5.h"
 
+#include "krb5_errs.h"
+
 #ifdef HAVE_KRB5
 
 static const struct {
diff --git a/source3/libads/krb5_errs.h b/source3/libads/krb5_errs.h
new file mode 100644 (file)
index 0000000..57b6391
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  Kerberos error mapping functions
+ *  Copyright (C) Guenther Deschner 2005
+ *
+ *  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 __KRB5_ERRS_H__
+#define __KRB5_ERRS_H__
+
+#include "replace.h"
+#include "libcli/util/ntstatus.h"
+#include <krb5.h>
+
+NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error);
+krb5_error_code nt_status_to_krb5(NTSTATUS nt_status);
+
+#endif
index e593ae8536cfd28d0ff741b80534a34df79139a4..2b6995bd56693c60f80bb261f0992f046442991f 100644 (file)
@@ -25,6 +25,7 @@
 #include "rpc_client/cli_pipe.h"
 #include "../libcli/drsuapi/drsuapi.h"
 #include "../librpc/gen_ndr/ndr_drsuapi_c.h"
+#include "libads/krb5_errs.h"
 
 /****************************************************************
 ****************************************************************/
index 8999a3535fb031bbd66ee9806c3403c9af5b350b..7526cd3294e44c61922d424196532f60037e810f 100644 (file)
@@ -23,6 +23,7 @@
 #include "libnet/libnet_dssync.h"
 #include "libnet/libnet_keytab.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
+#include "libads/krb5_errs.h"
 
 #if defined(HAVE_ADS)
 
index 837299d922022ed310fb53a0a3d470dca4196a1a..0a54d47227a6222bd353a69918927e4c120701de 100644 (file)
@@ -41,6 +41,7 @@
 #include "../libcli/smb/smb_seal.h"
 #include "lib/param/param.h"
 #include "../libcli/smb/smb2_negotiate_context.h"
+#include "libads/krb5_errs.h"
 
 #define STAR_SMBSERVER "*SMBSERVER"
 
index d8ffcaa7fb6abe9c0ce9cc588bb2cc96526862d3..b816b3aa7f8f3d4a5e14a82cd6abd05cc00c647b 100644 (file)
@@ -37,6 +37,7 @@
 #include "lib/krb5_wrap/krb5_samba.h"
 #include "lib/util/time_basic.h"
 #include "../libds/common/flags.h"
+#include "libads/krb5_errs.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
index c7332297982832d209bafebfa0db7e6aaf19cb88..85ad426446ae820beea9e3ecf7c419a4c387ad59 100644 (file)
@@ -26,6 +26,7 @@
 #include "../libcli/auth/libcli_auth.h"
 #include "smb_krb5.h"
 #include "libads/kerberos_proto.h"
+#include "libads/krb5_errs.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index a02926decb24dc5dc53160871730eaf366bb6cde..873c2f6d3e8154a44e0986ecb3226ce94677987a 100644 (file)
@@ -45,6 +45,7 @@
 #include "lib/afs/afs_funcs.h"
 #include "libsmb/samlogon_cache.h"
 #include "rpc_client/util_netlogon.h"
+#include "libads/krb5_errs.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND