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
67754ae0
Commit
67754ae0
authored
Jan 14, 2019
by
antirez
Browse files
ACL: ACLSetUser(), fix flag and add allcommands +
@all
opcode.
parent
e7d15e48
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
67754ae0
...
@@ -153,8 +153,13 @@ int ACLSetUser(user *u, const char *op) {
...
@@ -153,8 +153,13 @@ int ACLSetUser(user *u, const char *op) {
}
else
if
(
!
strcasecmp
(
op
,
"allkeys"
)
||
}
else
if
(
!
strcasecmp
(
op
,
"allkeys"
)
||
!
strcasecmp
(
op
,
"~*"
))
!
strcasecmp
(
op
,
"~*"
))
{
{
memset
(
u
->
allowed_subcommands
,
255
,
sizeof
(
u
->
allowed_commands
));
u
->
flags
|=
USER_FLAG_ALLKEYS
;
u
->
flags
|=
USER_FLAG_ALLKEYS
;
if
(
u
->
patterns
)
listEmpty
(
u
->
patterns
);
}
else
if
(
!
strcasecmp
(
op
,
"allcommands"
)
||
!
strcasecmp
(
op
,
"+@all"
))
{
memset
(
u
->
allowed_subcommands
,
255
,
sizeof
(
u
->
allowed_commands
));
u
->
flags
|=
USER_FLAG_ALLCOMMANDS
;
}
else
{
}
else
{
return
C_ERR
;
return
C_ERR
;
}
}
...
...
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