From e9a902a95802367462cf42d9f950498ccf00b74b Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 10 Jan 2019 16:35:55 +0100 Subject: [PATCH] ACL: split acl.c into clear sections. --- src/acl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/acl.c b/src/acl.c index b624ff3b..2202f293 100644 --- a/src/acl.c +++ b/src/acl.c @@ -29,6 +29,10 @@ #include "server.h" +/* ============================================================================= + * Helper functions for the rest of the ACL implementation + * ==========================================================================*/ + /* Return zero if strings are the same, non-zero if they are not. * The comparison is performed in a way that prevents an attacker to obtain * information about the nature of the strings just monitoring the execution @@ -71,6 +75,10 @@ int time_independent_strcmp(char *a, char *b) { return diff; /* If zero strings are the same. */ } +/* ============================================================================= + * Low level ACL API + * ==========================================================================*/ + /* Check the username and password pair and return C_OK if they are valid, * otherwise C_ERR is returned and errno is set to: * @@ -115,3 +123,7 @@ unsigned long ACLGetCommandID(const char *cmdname) { user *ACLGetUserByName(const char *name, size_t namelen) { return NULL; } + +/* ============================================================================= + * ACL related commands + * ==========================================================================*/