[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Sun Feb 12 22:14:03 MST 2012
The branch, master has been updated
via cf155fa s3-selftest: Do not assume $USERNAME is the same as $DC_USERNAME
via 70f4a96 selftest: Allow setup_env() to signal that an environment name is unknown
via 3bf9221 s3-build: expliticly require gssapi for HAVE_KRB5 and remove HAVE_GSSAPI
via 4a0d1b5 s3-libads: Move to using only the HAVE_KRB5 define
via 310cf98 s3-lib/addns: Move to system/kerberos.h and HAVE_KRB5
from bee55a2 s4-dsdb: Check if metadata.tdb exists, before trying to open it
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit cf155fa366cd11a24c351452d3b9ccde707de07a
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Feb 13 12:36:21 2012 +1100
s3-selftest: Do not assume $USERNAME is the same as $DC_USERNAME
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Mon Feb 13 06:13:38 CET 2012 on sn-devel-104
commit 70f4a96c68e91e407651e2487cc3c66a80262fa2
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Feb 13 12:14:57 2012 +1100
selftest: Allow setup_env() to signal that an environment name is unknown
This will allow us to skip samba4 environments that may be mentioned in
the source3/selftest/tests.py file.
Andrew Bartlett
commit 3bf922111a29277e390361c6f4cf7580ff4453e3
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Feb 13 11:26:24 2012 +1100
s3-build: expliticly require gssapi for HAVE_KRB5 and remove HAVE_GSSAPI
The requirement for gss functions already make this happen, but
this is clearer. No code depends on HAVE_GSSAPI any more.
Andrew Bartlett
commit 4a0d1b5ac6c2a42fd5df969acf91bb8e60af06e1
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Feb 13 11:23:15 2012 +1100
s3-libads: Move to using only the HAVE_KRB5 define
HAVE_KRB5 already implies that GSSAPI is present as well.
Andrew Bartlett
commit 310cf9857491e23678657598739d77520e7afcda
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Feb 13 11:21:11 2012 +1100
s3-lib/addns: Move to system/kerberos.h and HAVE_KRB5
-----------------------------------------------------------------------
Summary of changes:
lib/addns/dns.h | 21 +++------------------
lib/addns/dnsgss.c | 4 ++--
selftest/selftest.pl | 9 ++++++++-
selftest/target/Samba.pm | 4 ++--
selftest/target/Samba3.pm | 2 +-
selftest/target/Samba4.pm | 2 +-
source3/configure.in | 3 ---
source3/libads/ads_status.c | 4 +---
source3/libads/sasl.c | 20 ++++++++++----------
source3/selftest/tests.py | 6 +++---
source3/wscript | 4 +---
source4/heimdal_build/wscript_configure | 1 -
12 files changed, 32 insertions(+), 48 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/addns/dns.h b/lib/addns/dns.h
index d98a27e..d099991 100644
--- a/lib/addns/dns.h
+++ b/lib/addns/dns.h
@@ -27,6 +27,7 @@
#include "../replace/replace.h"
#include "system/network.h"
+#include "system/kerberos.h"
/* make sure we have included the correct config.h */
#ifndef NO_CONFIG_H /* for some tests */
@@ -77,22 +78,6 @@
#endif
#endif
-#ifdef HAVE_KRB5_H
-#include <krb5.h>
-#endif
-
-#if 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 defined(HAVE_GSSAPI_H) || defined(HAVE_GSSAPI_GSSAPI_H) || defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
-#define HAVE_GSSAPI_SUPPORT 1
-#endif
-
#include <talloc.h>
/*******************************************************************
@@ -483,7 +468,7 @@ const char *dns_errstr(DNS_ERROR err);
/* from dnsgss.c */
-#ifdef HAVE_GSSAPI_SUPPORT
+#ifdef HAVE_KRB5
void display_status( const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat );
DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm,
@@ -497,6 +482,6 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req,
const char *algorithmname,
time_t time_signed, uint16 fudge);
-#endif /* HAVE_GSSAPI_SUPPORT */
+#endif /* HAVE_KRB5 */
#endif /* _DNS_H */
diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c
index 19b734a..4fef832 100644
--- a/lib/addns/dnsgss.c
+++ b/lib/addns/dnsgss.c
@@ -26,7 +26,7 @@
#include <ctype.h>
-#ifdef HAVE_GSSAPI_SUPPORT
+#ifdef HAVE_KRB5
/*********************************************************************
*********************************************************************/
@@ -331,4 +331,4 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req,
return err;
}
-#endif /* HAVE_GSSAPI_SUPPORT */
+#endif /* HAVE_KRB5 */
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index e5ccbd8..4625172 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -882,7 +882,9 @@ sub setup_env($$)
}
} else {
$testenv_vars = $target->setup_env($envname, $prefix);
- if (defined($testenv_vars) && not defined($testenv_vars->{target})) {
+ if (defined($testenv_vars) and $testenv_vars eq "UNKNOWN") {
+ return $testenv_vars;
+ } elsif (defined($testenv_vars) && not defined($testenv_vars->{target})) {
$testenv_vars->{target} = $target;
}
if (not defined($testenv_vars)) {
@@ -1024,6 +1026,11 @@ $envvarstr
Subunit::end_testsuite($name, "error",
"unable to set up environment $envname - exiting");
next;
+ } elsif ($envvars eq "UNKNOWN") {
+ Subunit::start_testsuite($name);
+ Subunit::end_testsuite($name, "skip",
+ "environment $envname is unknown in this test backend - skipping");
+ next;
}
# Generate a file with the individual tests to run, if the
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 64bc405..eea1987 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -27,13 +27,13 @@ sub setup_env($$$)
$ENV{ENVNAME} = $envname;
my $env = $self->{samba4}->setup_env($envname, $path);
- if (defined($env)) {
+ if (defined($env) and $env ne "UNKNOWN") {
if (not defined($env->{target})) {
$env->{target} = $self->{samba4};
}
} else {
$env = $self->{samba3}->setup_env($envname, $path);
- if (defined($env)) {
+ if (defined($env) and $env ne "UNKNOWN") {
if (not defined($env->{target})) {
$env->{target} = $self->{samba3};
}
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index b710d54..7ecb481 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -112,7 +112,7 @@ sub setup_env($$$)
}
return $self->setup_member("$path/member", $self->{vars}->{s3dc});
} else {
- return undef;
+ return "UNKNOWN";
}
}
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 52c6d68..8ac3ee7 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1429,7 +1429,7 @@ sub setup_env($$$)
} elsif ($envname eq "plugin_s4_dc") {
return $self->setup_plugin_s4_dc("$path/plugin_s4_dc");
} else {
- return undef;
+ return "UNKNOWN";
}
}
diff --git a/source3/configure.in b/source3/configure.in
index ea212f6..938f2a3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4488,9 +4488,6 @@ if test x"$with_ads_support" != x"no"; then
if test x"$use_ads" = x"yes"; then
AC_DEFINE(WITH_ADS,1,[Whether to include Active Directory support])
AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support])
- if test x"$have_gssapi" = x"yes"; then
- AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])
- fi
else
if test x"$with_ads_support" = x"yes"; then
AC_MSG_ERROR(krb5 libs don't have all features required for Active Directory support)
diff --git a/source3/libads/ads_status.c b/source3/libads/ads_status.c
index a9e59ed..919e5d3 100644
--- a/source3/libads/ads_status.c
+++ b/source3/libads/ads_status.c
@@ -112,8 +112,6 @@ const char *ads_errstr(ADS_STATUS status)
#ifdef HAVE_KRB5
case ENUM_ADS_ERROR_KRB5:
return error_message(status.err.rc);
-#endif
-#ifdef HAVE_GSSAPI
case ENUM_ADS_ERROR_GSS:
{
char *ret;
@@ -144,7 +142,7 @@ const char *ads_errstr(ADS_STATUS status)
}
}
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
NTSTATUS gss_err_to_ntstatus(uint32 maj, uint32 min)
{
ADS_STATUS adss = ADS_ERROR_GSS(maj, min);
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 4186841..02fd754 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -268,7 +268,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
return ADS_ERROR(rc);
}
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
static ADS_STATUS ads_sasl_gssapi_wrap(ADS_STRUCT *ads, uint8 *buf, uint32 len)
{
gss_ctx_id_t context_handle = (gss_ctx_id_t)ads->ldap.wrap_private_data;
@@ -609,12 +609,12 @@ failed:
return status;
}
-#endif /* HAVE_GSSAPI */
+#endif /* HAVE_KRB5 */
#ifdef HAVE_KRB5
struct ads_service_principal {
char *string;
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
gss_name_t name;
#endif
};
@@ -623,7 +623,7 @@ static void ads_free_service_principal(struct ads_service_principal *p)
{
SAFE_FREE(p->string);
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
if (p->name) {
uint32 minor_status;
gss_release_name(&minor_status, &p->name);
@@ -706,7 +706,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
struct ads_service_principal *p)
{
ADS_STATUS status;
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
gss_buffer_desc input_name;
/* GSS_KRB5_NT_PRINCIPAL_NAME */
gss_OID_desc nt_principal =
@@ -740,7 +740,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
}
}
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
input_name.value = p->string;
input_name.length = strlen(p->string);
@@ -793,7 +793,7 @@ static ADS_STATUS ads_sasl_spnego_rawkrb5_bind(ADS_STRUCT *ads, const char *prin
static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads,
struct ads_service_principal *p)
{
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
/*
* we only use the gsskrb5 based implementation
* when sasl sign or seal is requested.
@@ -919,7 +919,7 @@ failed:
return status;
}
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
#define MAX_GSS_PASSES 3
/* this performs a SASL/gssapi bind
@@ -1155,7 +1155,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
return status;
}
-#endif /* HAVE_GSSAPI */
+#endif /* HAVE_KRB5 */
/* mapping between SASL mechanisms and functions */
static struct {
@@ -1163,7 +1163,7 @@ static struct {
ADS_STATUS (*fn)(ADS_STRUCT *);
} sasl_mechanisms[] = {
{"GSS-SPNEGO", ads_sasl_spnego_bind},
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
{"GSSAPI", ads_sasl_gssapi_bind}, /* doesn't work with .NET RC1. No idea why */
#endif
{NULL, NULL}
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 6376eae..d50b3ba 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -128,10 +128,10 @@ tests=["--ping", "--separator",
"--online-status --domain=$DOMAIN",
#Didn't pass yet# "--domain-users",
"--domain-groups",
- "--name-to-sid=$USERNAME",
- "--name-to-sid=$DOMAIN\\\\$USERNAME",
+ "--name-to-sid=$DC_USERNAME",
+ "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
#Didn't pass yet# "--user-info=$USERNAME",
- "--user-groups=$DOMAIN\\\\$USERNAME",
+ "--user-groups=$DOMAIN\\\\$DC_USERNAME",
"--allocate-uid",
"--allocate-gid"]
diff --git a/source3/wscript b/source3/wscript
index b47d71a..4fe0535 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -815,8 +815,6 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
if use_ads:
conf.DEFINE('WITH_ADS', '1')
conf.DEFINE('HAVE_KRB5', '1')
- if have_gssapi:
- conf.DEFINE('HAVE_GSSAPI', '1')
if conf.CONFIG_SET('HAVE_LDAP'):
conf.env['HAVE_ADS'] = '1'
else:
@@ -995,7 +993,7 @@ int i; i = PAM_RADIO_TYPE;
conf.CHECK_FUNCS_IN('uuid_generate', 'uuid')
if not conf.CONFIG_SET('HAVE_UUID_UUID_H') and not conf.CONFIG_SET('HAVE_UUID_GENERATE'):
Logs.warn("--with-dnsupdate=yes but uuid support not sufficient")
- elif not conf.CONFIG_SET('HAVE_GSSAPI'):
+ elif not conf.CONFIG_SET('HAVE_KRB5'):
Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient")
else:
conf.DEFINE('WITH_DNS_UPDATES', 1)
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index a9ba14f..eab2cf3 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -62,7 +62,6 @@ conf.CHECK_DECLS('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')
conf.DEFINE('HAVE_KRB5',1)
-conf.DEFINE('HAVE_GSSAPI',1)
conf.CHECK_FUNCS('dirfd', headers='dirent.h')
conf.CHECK_DECLS('dirfd', reverse=True, headers='dirent.h')
--
Samba Shared Repository
More information about the samba-cvs
mailing list