From be362da7066198941974e5a624006d5f97f0629c Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 25 Jan 2011 11:40:35 -0500 Subject: [PATCH] INFO command 'openid support' is now indicated as the version of OpenID support (currently 1) instead of a boolean. --- citadel/citserver.c | 3 ++- citadel/citserver.h | 1 + citadel/modules/openid/serv_openid_rp.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index e1843eb20..9570e3066 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -82,6 +82,7 @@ char *unique_session_numbers; int ScheduledShutdown = 0; time_t server_startup_time; int panic_fd; +int openid_level_supported = 0; /* * print the actual stack frame. @@ -316,7 +317,7 @@ void cmd_info(char *cmdbuf) { cprintf("%s\n", svn_revision()); if (config.c_auth_mode == AUTHMODE_NATIVE) { - cprintf("1\n"); /* OpenID is enabled when using native auth */ + cprintf("%d\n", openid_level_supported); /* OpenID is enabled when using native auth */ } else { cprintf("0\n"); /* OpenID is disabled when using non-native auth */ diff --git a/citadel/citserver.h b/citadel/citserver.h index c294916e2..0540a7670 100644 --- a/citadel/citserver.h +++ b/citadel/citserver.h @@ -48,3 +48,4 @@ void GenerateRoomDisplay(char *real_room, extern int panic_fd; char CtdlCheckExpress(void); extern time_t server_startup_time; +extern int openid_level_supported; diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index d8fa443fd..69aa50b6e 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -964,6 +964,7 @@ CTDL_MODULE_INIT(openid_rp) } CtdlRegisterSessionHook(openid_cleanup_function, EVT_LOGOUT); CtdlRegisterUserHook(openid_purge, EVT_PURGEUSER); + openid_level_supported = 1; /* This module supports OpenID 1.0 only */ } /* return our Subversion id for the Log */ -- 2.30.2