summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/credentials/credentials_krb5.c1
-rw-r--r--auth/kerberos/gssapi_pac.c1
-rw-r--r--auth/kerberos/pac_utils.h2
-rw-r--r--buildtools/wafsamba/samba3.py4
-rw-r--r--lib/addns/dns.h1
-rw-r--r--lib/krb5_wrap/krb5_samba.c1
-rw-r--r--lib/replace/system/gssapi.h53
-rw-r--r--lib/replace/system/kerberos.h18
-rwxr-xr-xlibcli/smb/wscript_build2
-rw-r--r--source3/configure.in2
-rw-r--r--source3/libads/ads_status.c1
-rw-r--r--source3/libads/sasl.c1
-rwxr-xr-xsource3/wscript_build4
-rw-r--r--source4/auth/gensec/gensec_gssapi.c4
-rw-r--r--source4/auth/kerberos/krb5_init_context.c1
-rwxr-xr-xsource4/auth/kerberos/wscript_build2
-rw-r--r--source4/heimdal_build/wscript_configure1
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c2
18 files changed, 75 insertions, 26 deletions
diff --git a/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c
index 480d7c5951..86b33d4998 100644
--- a/auth/credentials/credentials_krb5.c
+++ b/auth/credentials/credentials_krb5.c
@@ -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"
diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c
index d1a79501cc..dadae1afa2 100644
--- a/auth/kerberos/gssapi_pac.c
+++ b/auth/kerberos/gssapi_pac.c
@@ -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
diff --git a/auth/kerberos/pac_utils.h b/auth/kerberos/pac_utils.h
index bb954597f5..7726f52775 100644
--- a/auth/kerberos/pac_utils.h
+++ b/auth/kerberos/pac_utils.h
@@ -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;
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index 369285c395..7f05ffe40d 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -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'):
diff --git a/lib/addns/dns.h b/lib/addns/dns.h
index d0999918c1..88ba9d1fc0 100644
--- a/lib/addns/dns.h
+++ b/lib/addns/dns.h
@@ -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 */
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index 4e555b2853..10207b58bc 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -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 */
diff --git a/lib/replace/system/gssapi.h b/lib/replace/system/gssapi.h
new file mode 100644
index 0000000000..c22663c1d0
--- /dev/null
+++ b/lib/replace/system/gssapi.h
@@ -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
diff --git a/lib/replace/system/kerberos.h b/lib/replace/system/kerberos.h
index 7762d4be46..636ce0f2e0 100644
--- a/lib/replace/system/kerberos.h
+++ b/lib/replace/system/kerberos.h
@@ -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
diff --git a/libcli/smb/wscript_build b/libcli/smb/wscript_build
index 6feed445df..4e860290e5 100755
--- a/libcli/smb/wscript_build
+++ b/libcli/smb/wscript_build
@@ -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='''
diff --git a/source3/configure.in b/source3/configure.in
index 70bdfc7b63..0253e076dc 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -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)
diff --git a/source3/libads/ads_status.c b/source3/libads/ads_status.c
index 919e5d34dc..fc489a9f00 100644
--- a/source3/libads/ads_status.c
+++ b/source3/libads/ads_status.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "smb_krb5.h"
+#include "system/gssapi.h"
#include "smb_ldap.h"
#include "libads/ads_status.h"
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 02fd7545e5..42d65b63d4 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -23,6 +23,7 @@
#include "auth_generic.h"
#include "ads.h"
#include "smb_krb5.h"
+#include "system/gssapi.h"
#ifdef HAVE_LDAP
diff --git a/source3/wscript_build b/source3/wscript_build
index ddd33467cc..b9bb6ad524 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -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',
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index efd8443760..31964731d5 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -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"
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 4125f39548..e90f8a6e19 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -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"
diff --git a/source4/auth/kerberos/wscript_build b/source4/auth/kerberos/wscript_build
index 2ba6d56410..1a9b544465 100755
--- a/source4/auth/kerberos/wscript_build
+++ b/source4/auth/kerberos/wscript_build
@@ -2,7 +2,7 @@
bld.SAMBA_SUBSYSTEM('KRB_INIT_CTX',
source='krb5_init_context.c',
- deps='krb5samba'
+ deps='gssapi krb5samba'
)
bld.SAMBA_LIBRARY('authkrb5',
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index e64128f44a..1c03b34106 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -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 = []
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 8097a67ab9..a1651b0f02 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -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