From b8e63cc966668b1c8e26b97c8e63f7ae65e6bd74 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 18 Dec 2015 11:34:36 +0100 Subject: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cerberus.c | 18 +++++++++++++++--- src/security.c | 7 +++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/cerberus.c b/src/cerberus.c index 3a7b9af..f8927f0 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -24,13 +24,25 @@ #include +/** + * Index of the hook used when the user logs in. + */ #define HOOK_LOGIN 0 + +/** + * Index of the hook used when the user logs out. + */ #define HOOK_LOGOUT 1 -#define HOOK_DENIED 2 -#define HOOK_VERIFY 3 +/** + * Index of the hook used when the user was denied access. + */ +#define HOOK_DENIED 2 -#define close(fd) while (((close)(fd) < 0) && (errno == EINTR)) +/** + * Index of the hook used to verify that the user may log in. + */ +#define HOOK_VERIFY 3 diff --git a/src/security.c b/src/security.c index ff67d95..fc409b1 100644 --- a/src/security.c +++ b/src/security.c @@ -34,9 +34,12 @@ #include "security.h" -#define close(fd) while (((close)(fd) < 0) && (errno == EINTR)) - +/** + * Called on failure. + * + * @param str The function that failed. + */ static void fail(const char* str) { perror(str); -- cgit v1.2.3-70-g09d2