diff options
author | Martin Willi <martin@revosec.ch> | 2012-11-06 11:48:58 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-12-19 10:40:33 +0100 |
commit | c57fe7ac6f5cfa45a9fb1d2b3d14c72141af3db3 (patch) | |
tree | d5a5953b0dd5d75c6dab5366ed8727e099947aa0 /src/libcharon | |
parent | 45d6134218885522093c0ae38522115671e1875b (diff) | |
download | strongswan-c57fe7ac6f5cfa45a9fb1d2b3d14c72141af3db3.tar.bz2 strongswan-c57fe7ac6f5cfa45a9fb1d2b3d14c72141af3db3.tar.xz |
Raise an alert if an authorize() hook fails
Diffstat (limited to 'src/libcharon')
-rw-r--r-- | src/libcharon/bus/bus.c | 4 | ||||
-rw-r--r-- | src/libcharon/bus/bus.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/bus/bus.c b/src/libcharon/bus/bus.c index 144a06908..b5cdaaa89 100644 --- a/src/libcharon/bus/bus.c +++ b/src/libcharon/bus/bus.c @@ -720,6 +720,10 @@ METHOD(bus_t, authorize, bool, } enumerator->destroy(enumerator); this->mutex->unlock(this->mutex); + if (!success) + { + alert(this, ALERT_AUTHORIZATION_FAILED); + } return success; } diff --git a/src/libcharon/bus/bus.h b/src/libcharon/bus/bus.h index 8dc38a8bf..32b28c6c4 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -124,6 +124,8 @@ enum alert_t { ALERT_UNIQUE_KEEP, /** allocating virtual IP failed, linked_list_t of host_t requested */ ALERT_VIP_FAILURE, + /** an authorize() hook failed, no argument */ + ALERT_AUTHORIZATION_FAILED, }; /** |