diff options
Diffstat (limited to 'proxy')
-rw-r--r-- | proxy/conf_macros.m4 | 27 | ||||
-rw-r--r-- | proxy/configure.ac | 1 | ||||
-rw-r--r-- | proxy/src/mechglue/gss_plugin.c | 9 |
3 files changed, 32 insertions, 5 deletions
diff --git a/proxy/conf_macros.m4 b/proxy/conf_macros.m4 index d474c7a..a04f694 100644 --- a/proxy/conf_macros.m4 +++ b/proxy/conf_macros.m4 @@ -242,7 +242,7 @@ AC_DEFUN([WITH_GSSIDEBUG], [Whether to build with interposer debugging support [no]] ) ], - [], + [], with_gssidebug=no ) if test x"$with_gssidebug" = xyes; then @@ -250,3 +250,28 @@ AC_DEFUN([WITH_GSSIDEBUG], fi ]) +AC_DEFUN([WITH_GPP_DEFAULT_BEHAVIOR], + [ AC_ARG_WITH([gpp_default_behavior], + [AC_HELP_STRING([--with-gpp-default-behavior=LOCAL_FIRST|LOCAL_ONLY|REMOTE_FIRST|REMOTE_ONLY], + [Which default behavior the gssproxy interposer plugin should use [LOCAL_FIRST]] + ) + ], + [], + ) + default_behavior=GPP_LOCAL_FIRST + if test x"$with_gpp_default_behavior" = x"LOCAL_FIRST"; then + AC_MSG_RESULT([Using gssproxy interposer behavior LOCAL_FIRST]) + elif test x"$with_gpp_default_behavior" = x"LOCAL_ONLY"; then + AC_MSG_RESULT([Using gssproxy interposer behavior LOCAL_ONLY]) + default_behavior=GPP_LOCAL_ONLY + elif test x"$with_gpp_default_behavior" = x"REMOTE_FIRST"; then + AC_MSG_RESULT([Using gssproxy interposer behavior REMOTE_FIRST]) + default_behavior=GPP_REMOTE_FIRST + elif test x"$with_gpp_default_behavior" = x"REMOTE_ONLY"; then + AC_MSG_ERROR([REMOTE_ONLY currently not supported]) + elif test x"$with_gpp_default_behavior" != x; then + AC_MSG_ERROR([unknown gpp default behavior]) + fi + AC_DEFINE_UNQUOTED(GPP_DEFAULT_BEHAVIOR, $default_behavior, [Default gssproxy interposer plugin behavior]) + ]) + diff --git a/proxy/configure.ac b/proxy/configure.ac index 770ab19..f3269e3 100644 --- a/proxy/configure.ac +++ b/proxy/configure.ac @@ -67,6 +67,7 @@ WITH_XML_CATALOG WITH_SELINUX WITH_GSSIDEBUG WITH_GPSTATE_PATH +WITH_GPP_DEFAULT_BEHAVIOR m4_include([external/pkg.m4]) m4_include([external/libpopt.m4]) diff --git a/proxy/src/mechglue/gss_plugin.c b/proxy/src/mechglue/gss_plugin.c index aac213e..0e62990 100644 --- a/proxy/src/mechglue/gss_plugin.c +++ b/proxy/src/mechglue/gss_plugin.c @@ -75,12 +75,13 @@ enum gpp_behavior gpp_get_behavior(void) } else if (strcmp(envval, "REMOTE_ONLY") == 0) { behavior = GPP_REMOTE_ONLY; } else { - /* unknwon setting, default to local first */ - behavior = GPP_LOCAL_FIRST; + /* unknown setting, default to what has been configured + * (by default local first) */ + behavior = GPP_DEFAULT_BEHAVIOR; } } else { - /* default to local only for now */ - behavior = GPP_LOCAL_FIRST; + /* default to what has been configured (by default local only) */ + behavior = GPP_DEFAULT_BEHAVIOR; } } |