diff options
| -rw-r--r-- | src/cerberus.c | 18 | ||||
| -rw-r--r-- | 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 <errno.h> +/** + * 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); |
