mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
lib/replace: split out GSSAPI from lib/replace/system/kerberos.h into lib/replace/system/gssapi.h
With waf build include directories are defined by dependencies specified to subsystems. Without proper dependency <gssapi/gssapi.h> cannot be found for embedded Heimdal builds when there are no system-wide gssapi/gssapi.h available. Split out GSSAPI header includes in a separate replacement header and use that explicitly where needed. Autobuild-User: Alexander Bokovoy <ab@samba.org> Autobuild-Date: Wed Apr 25 00:18:33 CEST 2012 on sn-devel-104
This commit is contained in:
parent
2d01099acc
commit
594e316181
@ -23,6 +23,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/kerberos.h"
|
||||
#include "system/gssapi.h"
|
||||
#include "auth/kerberos/kerberos.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "auth/credentials/credentials_proto.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "includes.h"
|
||||
#ifdef HAVE_KRB5
|
||||
|
||||
#include "lib/krb5_wrap/krb5_samba.h"
|
||||
#include "auth/kerberos/pac_utils.h"
|
||||
|
||||
#if 0
|
||||
|
@ -22,6 +22,8 @@
|
||||
#define _PAC_UTILS_H
|
||||
|
||||
#include "lib/krb5_wrap/krb5_samba.h"
|
||||
#include "system/gssapi.h"
|
||||
|
||||
struct PAC_SIGNATURE_DATA;
|
||||
struct PAC_DATA;
|
||||
|
||||
|
@ -56,8 +56,10 @@ def s3_fix_kwargs(bld, kwargs):
|
||||
# local heimdal paths only included when USING_SYSTEM_KRB5 is not set
|
||||
if not bld.CONFIG_SET("USING_SYSTEM_KRB5"):
|
||||
extra_includes += [ '../source4/heimdal/lib/com_err',
|
||||
'../source4/heimdal/lib/krb5',
|
||||
'../source4/heimdal/lib/gssapi',
|
||||
'../source4/heimdal_build' ]
|
||||
'../source4/heimdal_build',
|
||||
'../bin/default/source4/heimdal/lib/asn1' ]
|
||||
|
||||
if bld.CONFIG_SET('BUILD_TDB2'):
|
||||
if bld.CONFIG_SET('USING_SYSTEM_TDB2'):
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "../replace/replace.h"
|
||||
#include "system/network.h"
|
||||
#include "system/kerberos.h"
|
||||
#include "system/gssapi.h"
|
||||
|
||||
/* make sure we have included the correct config.h */
|
||||
#ifndef NO_CONFIG_H /* for some tests */
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define GSSAPI_BNDLENGTH 16 /* Bind Length (rfc-1964 pg.3) */
|
||||
#define GSSAPI_CHECKSUM_SIZE (4+GSSAPI_BNDLENGTH+4) /* Length of bind length,
|
||||
bind field, flags field. */
|
||||
#define GSS_C_DELEG_FLAG 1
|
||||
|
||||
/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
|
||||
but still has the symbol */
|
||||
|
53
lib/replace/system/gssapi.h
Normal file
53
lib/replace/system/gssapi.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef _system_gssapi_h
|
||||
#define _system_gssapi_h
|
||||
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
GSSAPI system include wrappers
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
** NOTE! The following LGPL license applies to the replace
|
||||
** library. This does NOT imply that all of Samba is released
|
||||
** under the LGPL
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_LIBGSSAPI
|
||||
|
||||
#ifdef HAVE_GSSAPI_GSSAPI_EXT_H
|
||||
#include <gssapi/gssapi_ext.h>
|
||||
#elif HAVE_GSSAPI_GSSAPI_H
|
||||
#include <gssapi/gssapi.h>
|
||||
#elif HAVE_GSSAPI_GSSAPI_GENERIC_H
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#elif HAVE_GSSAPI_H
|
||||
#include <gssapi.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GSSAPI_GSSAPI_KRB5_H
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GSSAPI_GSSAPI_SPNEGO_H
|
||||
#include <gssapi/gssapi_spnego.h>
|
||||
#elif HAVE_GSSAPI_SPNEGO_H
|
||||
#include <gssapi_spnego.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
@ -7,11 +7,11 @@
|
||||
kerberos system include wrappers
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
|
||||
** NOTE! The following LGPL license applies to the replace
|
||||
** library. This does NOT imply that all of Samba is released
|
||||
** under the LGPL
|
||||
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
@ -37,19 +37,5 @@
|
||||
#include <com_err.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSSAPI_GSSAPI_EXT_H
|
||||
#include <gssapi/gssapi_ext.h>
|
||||
#elif HAVE_GSSAPI_GSSAPI_H
|
||||
#include <gssapi/gssapi.h>
|
||||
#elif HAVE_GSSAPI_GSSAPI_GENERIC_H
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#elif HAVE_GSSAPI_H
|
||||
#include <gssapi.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GSSAPI_GSSAPI_KRB5_H
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -10,7 +10,7 @@ bld.SAMBA_LIBRARY('cli_smb_common',
|
||||
smbXcli_base.c
|
||||
smb1cli_trans.c
|
||||
''',
|
||||
deps='LIBCRYPTO errors gssapi gensec krb5samba LIBASYNC_REQ',
|
||||
deps='LIBCRYPTO errors gensec krb5samba LIBASYNC_REQ',
|
||||
public_deps='talloc samba-util',
|
||||
private_library=True,
|
||||
public_headers='''
|
||||
|
@ -3568,6 +3568,8 @@ if test x"$with_ads_support" != x"no"; then
|
||||
if test x"$have_gssapi" != xyes ; then
|
||||
AC_MSG_WARN([Samba cannot be supported without GSSAPI])
|
||||
use_ads=no
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBGSSAPI, , [Whether the platform has GSSAPI support])
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNC_EXT(krb5_set_real_time, $KRB5_LIBS)
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smb_krb5.h"
|
||||
#include "system/gssapi.h"
|
||||
#include "smb_ldap.h"
|
||||
#include "libads/ads_status.h"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "auth_generic.h"
|
||||
#include "ads.h"
|
||||
#include "smb_krb5.h"
|
||||
#include "system/gssapi.h"
|
||||
|
||||
#ifdef HAVE_LDAP
|
||||
|
||||
|
@ -782,7 +782,7 @@ bld.SAMBA3_LIBRARY('util_cmdline',
|
||||
|
||||
bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
|
||||
source=KRBCLIENT_SRC,
|
||||
public_deps='krb5samba k5crypto LIBTSOCKET CLDAP LIBNMB',
|
||||
public_deps='krb5samba k5crypto gssapi LIBTSOCKET CLDAP LIBNMB',
|
||||
vars=locals())
|
||||
|
||||
bld.SAMBA3_SUBSYSTEM('samba3util',
|
||||
@ -875,7 +875,7 @@ bld.SAMBA3_LIBRARY('ads',
|
||||
|
||||
bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
|
||||
source=LIBADS_SERVER_SRC,
|
||||
deps='SERVER_MUTEX ndr-krb5pac krb5samba',
|
||||
deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi',
|
||||
vars=locals())
|
||||
|
||||
bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "includes.h"
|
||||
#include "lib/events/events.h"
|
||||
#include "system/kerberos.h"
|
||||
#include "system/gssapi.h"
|
||||
#include "auth/kerberos/kerberos.h"
|
||||
#include "librpc/gen_ndr/krb5pac.h"
|
||||
#include "auth/auth.h"
|
||||
@ -37,9 +38,6 @@
|
||||
#include "auth/gensec/gensec_toplevel_proto.h"
|
||||
#include "param/param.h"
|
||||
#include "auth/session_proto.h"
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
#include <gssapi/gssapi_spnego.h>
|
||||
#include "gensec_gssapi.h"
|
||||
#include "lib/util/util_net.h"
|
||||
#include "auth/kerberos/pac_utils.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/kerberos.h"
|
||||
#include "system/gssapi.h"
|
||||
#include <tevent.h>
|
||||
#include "auth/kerberos/kerberos.h"
|
||||
#include "lib/socket/socket.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('KRB_INIT_CTX',
|
||||
source='krb5_init_context.c',
|
||||
deps='krb5samba'
|
||||
deps='gssapi krb5samba'
|
||||
)
|
||||
|
||||
bld.SAMBA_LIBRARY('authkrb5',
|
||||
|
@ -147,6 +147,7 @@ conf.define('HAVE_KRB5_PDU_NONE_DECL', 1)
|
||||
conf.define('HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96', 1)
|
||||
conf.define('HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96', 1)
|
||||
conf.define('HAVE_KRB5_KRB5_PRINCIPAL_GET_NUM_COMP', 1)
|
||||
conf.define('HAVE_GSSAPI_GSSAPI_SPNEGO_H', 1)
|
||||
|
||||
heimdal_includedirs = []
|
||||
heimdal_libdirs = []
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "lib/socket/socket.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "auth/credentials/credentials_krb5.h"
|
||||
#include <gssapi/gssapi.h>
|
||||
#include "system/gssapi.h"
|
||||
#include "system/locale.h"
|
||||
|
||||
/* this is the private structure used to keep the state of an open
|
||||
|
Loading…
x
Reference in New Issue
Block a user