summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-03 07:08:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:15 -0500
commitc8ba520c5a66f2d4a4d95baf366a2194a752e9c5 (patch)
tree9045f68d626fefa75ebe731ce47e3ede95249d18 /source4
parent8eb981c90a6094b15d4b71cc14fee4f23c713cf8 (diff)
downloadsamba-c8ba520c5a66f2d4a4d95baf366a2194a752e9c5.tar.gz
samba-c8ba520c5a66f2d4a4d95baf366a2194a752e9c5.tar.bz2
samba-c8ba520c5a66f2d4a4d95baf366a2194a752e9c5.zip
r4500: Allow GENSEC modules to be disabled by setting a flag on their module
definition, not by hardcoded reference in loadparm.c Andrew Bartlett (This used to be commit 43558eaf7604d2bb0187e0d1ba0686935a965ad7)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/gensec.c2
-rw-r--r--source4/libcli/auth/gensec.h1
-rw-r--r--source4/libcli/auth/gensec_gssapi.c6
-rw-r--r--source4/libcli/auth/gensec_krb5.c2
-rw-r--r--source4/param/loadparm.c5
5 files changed, 8 insertions, 8 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index 79cd98a076..c052f61c8c 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -778,7 +778,7 @@ NTSTATUS gensec_register(const void *_ops)
{
const struct gensec_security_ops *ops = _ops;
- if (!lp_parm_bool(-1, "gensec", ops->name, True)) {
+ if (!lp_parm_bool(-1, "gensec", ops->name, !ops->disabled_by_default)) {
DEBUG(2,("gensec subsystem %s is disabled\n", ops->name));
return NT_STATUS_OK;
}
diff --git a/source4/libcli/auth/gensec.h b/source4/libcli/auth/gensec.h
index 7c462414ff..8ee6abcd44 100644
--- a/source4/libcli/auth/gensec.h
+++ b/source4/libcli/auth/gensec.h
@@ -94,6 +94,7 @@ struct gensec_security_ops {
struct auth_session_info **session_info);
BOOL (*have_feature)(struct gensec_security *gensec_security,
uint32 feature);
+ BOOL disabled_by_default;
};
#define GENSEC_INTERFACE_VERSION 0
diff --git a/source4/libcli/auth/gensec_gssapi.c b/source4/libcli/auth/gensec_gssapi.c
index 432d59ef24..f30d3c5c62 100644
--- a/source4/libcli/auth/gensec_gssapi.c
+++ b/source4/libcli/auth/gensec_gssapi.c
@@ -334,7 +334,8 @@ static const struct gensec_security_ops gensec_gssapi_krb5_security_ops = {
.update = gensec_gssapi_update,
.wrap = gensec_gssapi_wrap,
.unwrap = gensec_gssapi_unwrap,
- .have_feature = gensec_gssapi_have_feature
+ .have_feature = gensec_gssapi_have_feature,
+ .disabled_by_default = True
};
@@ -347,7 +348,8 @@ static const struct gensec_security_ops gensec_gssapi_spnego_security_ops = {
.update = gensec_gssapi_update,
.wrap = gensec_gssapi_wrap,
.unwrap = gensec_gssapi_unwrap,
- .have_feature = gensec_gssapi_have_feature
+ .have_feature = gensec_gssapi_have_feature,
+ .disabled_by_default = True
};
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index f55006c644..ce51cef894 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -712,6 +712,7 @@ static const struct gensec_security_ops gensec_krb5_security_ops = {
.session_key = gensec_krb5_session_key,
.session_info = gensec_krb5_session_info,
.have_feature = gensec_krb5_have_feature,
+ .disabled_by_default = True
};
static const struct gensec_security_ops gensec_ms_krb5_security_ops = {
@@ -724,6 +725,7 @@ static const struct gensec_security_ops gensec_ms_krb5_security_ops = {
.session_key = gensec_krb5_session_key,
.session_info = gensec_krb5_session_info,
.have_feature = gensec_krb5_have_feature,
+ .disabled_by_default = True
};
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 00c9133067..da23dd02ef 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -3078,11 +3078,6 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
lp_do_parameter(-1, "wins server", "127.0.0.1");
}
- lp_do_parameter(-1, "gensec:gssapi_krb5", "False");
- lp_do_parameter(-1, "gensec:gssapi_spnego", "False");
- lp_do_parameter(-1, "gensec:krb5", "False");
- lp_do_parameter(-1, "gensec:ms_krb5", "False");
-
init_iconv();
return (bRetval);