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
8dfeb4fb
Commit
8dfeb4fb
authored
Jan 21, 2019
by
antirez
Browse files
ACL: setuser reset implemented.
parent
9e5c3828
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
8dfeb4fb
...
@@ -342,6 +342,11 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) {
...
@@ -342,6 +342,11 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) {
ACLSetUserCommandBit
(
u
,
id
,
0
);
ACLSetUserCommandBit
(
u
,
id
,
0
);
u
->
flags
&=
~
USER_FLAG_ALLCOMMANDS
;
u
->
flags
&=
~
USER_FLAG_ALLCOMMANDS
;
ACLResetSubcommandsForCommand
(
u
,
id
);
ACLResetSubcommandsForCommand
(
u
,
id
);
}
else
if
(
!
strcasecmp
(
op
,
"reset"
))
{
serverAssert
(
ACLSetUser
(
u
,
"resetpass"
,
-
1
)
==
C_OK
);
serverAssert
(
ACLSetUser
(
u
,
"resetkeys"
,
-
1
)
==
C_OK
);
serverAssert
(
ACLSetUser
(
u
,
"off"
,
-
1
)
==
C_OK
);
serverAssert
(
ACLSetUser
(
u
,
"-@all"
,
-
1
)
==
C_OK
);
}
else
{
}
else
{
errno
=
EINVAL
;
errno
=
EINVAL
;
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