]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Raise an alert if an authorize() hook fails
authorMartin Willi <martin@revosec.ch>
Tue, 6 Nov 2012 10:48:58 +0000 (11:48 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 19 Dec 2012 09:40:33 +0000 (10:40 +0100)
src/libcharon/bus/bus.c
src/libcharon/bus/bus.h

index 144a06908eefd6a21f0ef41fdbff50bf20853857..b5cdaaa8944eb833f02d4ba9f16c05d269aada92 100644 (file)
@@ -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;
 }
 
index 8dc38a8bf411e2db24e6020918bd26adb67e652b..32b28c6c461972a319bf8e85eb30df1a2d45a3bb 100644 (file)
@@ -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,
 };
 
 /**