diff options
Diffstat (limited to 'src/pluto/xauth.c')
-rw-r--r-- | src/pluto/xauth.c | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/src/pluto/xauth.c b/src/pluto/xauth.c index 8f4dc2460..af2d72d71 100644 --- a/src/pluto/xauth.c +++ b/src/pluto/xauth.c @@ -11,8 +11,6 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. - * - * RCSID $Id: xauth.c 3738 2008-04-02 19:04:45Z andreas $ */ #include <dlfcn.h> @@ -29,51 +27,51 @@ void xauth_init(void) { #ifdef XAUTH_DEFAULT_LIB - xauth_module.handle = dlopen(XAUTH_DEFAULT_LIB, RTLD_NOW); + xauth_module.handle = dlopen(XAUTH_DEFAULT_LIB, RTLD_NOW); - if (xauth_module.handle != NULL) - { - DBG(DBG_CONTROL, - DBG_log("xauth module '%s' loading'", XAUTH_DEFAULT_LIB) - ) - xauth_module.get_secret = (bool (*) (const xauth_t*)) - dlsym(xauth_module.handle, "get_secret"); - DBG(DBG_CONTROL, - if (xauth_module.get_secret != NULL) - { - DBG_log("xauth module: found get_secret() function"); - } - ) - xauth_module.verify_secret = (bool (*) (const xauth_peer_t*, const xauth_t*)) - dlsym(xauth_module.handle, "verify_secret"); - DBG(DBG_CONTROL, - if (xauth_module.verify_secret != NULL) - { - DBG_log("xauth module: found verify_secret() function"); - } - ) - } + if (xauth_module.handle != NULL) + { + DBG(DBG_CONTROL, + DBG_log("xauth module '%s' loading'", XAUTH_DEFAULT_LIB) + ) + xauth_module.get_secret = (bool (*) (const xauth_t*)) + dlsym(xauth_module.handle, "get_secret"); + DBG(DBG_CONTROL, + if (xauth_module.get_secret != NULL) + { + DBG_log("xauth module: found get_secret() function"); + } + ) + xauth_module.verify_secret = (bool (*) (const xauth_peer_t*, const xauth_t*)) + dlsym(xauth_module.handle, "verify_secret"); + DBG(DBG_CONTROL, + if (xauth_module.verify_secret != NULL) + { + DBG_log("xauth module: found verify_secret() function"); + } + ) + } #endif - /* any null function pointers will be filled in by default functions */ - xauth_defaults(); + /* any null function pointers will be filled in by default functions */ + xauth_defaults(); } void xauth_finalize(void) { #ifdef XAUTH_DEFAULT_LIB - if (xauth_module.handle != NULL) - { - if (dlclose(xauth_module.handle)) - { - plog("failed to unload xauth module"); - } - else + if (xauth_module.handle != NULL) { - DBG(DBG_CONTROL, - DBG_log("xauth module unloaded") - ) + if (dlclose(xauth_module.handle)) + { + plog("failed to unload xauth module"); + } + else + { + DBG(DBG_CONTROL, + DBG_log("xauth module unloaded") + ) + } } - } #endif } |