Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e9a902a9
Commit
e9a902a9
authored
Jan 10, 2019
by
antirez
Browse files
ACL: split acl.c into clear sections.
parent
4278104a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
e9a902a9
...
...
@@ -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
* ==========================================================================*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment