X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_gssapi.git;a=blobdiff_plain;f=src%2Fmod_auth_gssapi.c;h=0ca9a278f53429ef2c561bcd8b2b40a56d0ce714;hp=48300e93467fd8bccfc1412e6d4fc156590b2022;hb=908581fd3bca791d24cae7fe5a8ae6adfb614ad8;hpb=fafb5384785c76c1f96cc689677574cfe459f3b6 diff --git a/src/mod_auth_gssapi.c b/src/mod_auth_gssapi.c index 48300e9..0ca9a27 100644 --- a/src/mod_auth_gssapi.c +++ b/src/mod_auth_gssapi.c @@ -572,6 +572,10 @@ static int mag_auth(request_rec *req) mc->auth_type = auth_type; } + if (cfg->send_persist) + apr_table_set(req->headers_out, "Persistent-Auth", + cfg->gss_conn_ctx ? "true" : "false"); + ret = OK; done: @@ -650,6 +654,13 @@ static const char *mag_conn_ctx(cmd_parms *parms, void *mconfig, int on) return NULL; } +static const char *mag_send_persist(cmd_parms *parms, void *mconfig, int on) +{ + struct mag_config *cfg = (struct mag_config *)mconfig; + cfg->send_persist = on ? true : false; + return NULL; +} + static const char *mag_use_sess(cmd_parms *parms, void *mconfig, int on) { struct mag_config *cfg = (struct mag_config *)mconfig; @@ -803,6 +814,8 @@ static const command_rec mag_commands[] = { "Translate principals to local names"), AP_INIT_FLAG("GssapiConnectionBound", mag_conn_ctx, NULL, OR_AUTHCFG, "Authentication is bound to the TCP connection"), + AP_INIT_FLAG("GssapiSignalPersistentAuth", mag_send_persist, NULL, OR_AUTHCFG, + "Send Persitent-Auth header according to connection bound"), AP_INIT_FLAG("GssapiUseSessions", mag_use_sess, NULL, OR_AUTHCFG, "Authentication uses mod_sessions to hold status"), AP_INIT_RAW_ARGS("GssapiSessionKey", mag_sess_key, NULL, OR_AUTHCFG,