Commit e9a902a9 authored by antirez's avatar antirez
Browse files

ACL: split acl.c into clear sections.

parent 4278104a
......@@ -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
* ==========================================================================*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment