diff options
author | Simo Sorce <simo@redhat.com> | 2012-05-30 16:42:35 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-09-14 16:15:26 -0400 |
commit | 152385795f8348dd8d6cdcb8922744491d773d86 (patch) | |
tree | de83472edfd9b6c4b7d42069b7f0ac5f12c2d90c /proxy/src | |
parent | d62df421b872937c52ac4082eb7a61e23870595f (diff) | |
download | gss-proxy-152385795f8348dd8d6cdcb8922744491d773d86.tar.gz gss-proxy-152385795f8348dd8d6cdcb8922744491d773d86.tar.xz gss-proxy-152385795f8348dd8d6cdcb8922744491d773d86.zip |
Add loop avoidance in proxy daemon and gssapi plugin
Diffstat (limited to 'proxy/src')
-rw-r--r-- | proxy/src/gp_init.c | 3 | ||||
-rw-r--r-- | proxy/src/mechglue/gss_plugin.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/proxy/src/gp_init.c b/proxy/src/gp_init.c index 9ad4ff1..835c049 100644 --- a/proxy/src/gp_init.c +++ b/proxy/src/gp_init.c @@ -65,6 +65,9 @@ void init_server(bool daemonize) /* Set up neutral locale */ setlocale(LC_ALL, ""); + /* Set env var to avoid looping to ourselves in GSSAPI */ + setenv("_GSSPROXY_LOOPS", "NO", 0); + gp_logging_init(); } diff --git a/proxy/src/mechglue/gss_plugin.c b/proxy/src/mechglue/gss_plugin.c index 8612dc6..ba41e80 100644 --- a/proxy/src/mechglue/gss_plugin.c +++ b/proxy/src/mechglue/gss_plugin.c @@ -66,6 +66,14 @@ gss_OID_set gss_mech_interposer(gss_OID mech_type) { gss_OID_set interposed_mechs; OM_uint32 maj, min; + char *envval; + + /* avoid looping in the gssproxy daemon by avoiding to interpose + * any mechanism */ + envval = getenv("_GSSPROXY_LOOPS"); + if (envval && strcmp(envval, "NO") == 0) { + return NULL; + } interposed_mechs = NULL; maj = 0; |