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
10f12129
Commit
10f12129
authored
Jan 18, 2019
by
antirez
Browse files
ACL: GetUserCommandBit() is a much better name for the function.
parent
48eeec5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
10f12129
...
...
@@ -325,7 +325,7 @@ int ACLGetCommandBitCoordinates(unsigned long id, uint64_t *word, uint64_t *bit)
*
* If the bit overflows the user internal represetation, zero is returned
* in order to disallow the execution of the command in such edge case. */
int
ACL
Check
Command
ID
(
user
*
u
,
unsigned
long
id
)
{
int
ACL
GetUser
Command
Bit
(
user
*
u
,
unsigned
long
id
)
{
uint64_t
word
,
bit
;
if
(
ACLGetCommandBitCoordinates
(
id
,
&
word
,
&
bit
)
==
C_ERR
)
return
0
;
return
u
->
allowed_commands
[
word
]
&
bit
;
...
...
@@ -353,7 +353,7 @@ int ACLCheckCommandPerm(client *c) {
{
/* If the bit is not set we have to check further, in case the
* command is allowed just with that specific subcommand. */
if
(
ACL
Check
Command
ID
(
u
,
id
)
==
0
)
{
if
(
ACL
GetUser
Command
Bit
(
u
,
id
)
==
0
)
{
/* Check if the subcommand matches. */
if
(
u
->
allowed_subcommands
==
NULL
||
c
->
argc
<
2
)
return
ACL_DENIED_CMD
;
...
...
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