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
416c6401
Commit
416c6401
authored
Feb 05, 2019
by
antirez
Browse files
ACL: change behavior of redefined user. Last line counts.
parent
775bf619
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
416c6401
...
@@ -978,12 +978,12 @@ int ACLLoadConfiguredUsers(void) {
...
@@ -978,12 +978,12 @@ int ACLLoadConfiguredUsers(void) {
listRewind
(
UsersToLoad
,
&
li
);
listRewind
(
UsersToLoad
,
&
li
);
while
((
ln
=
listNext
(
&
li
))
!=
NULL
)
{
while
((
ln
=
listNext
(
&
li
))
!=
NULL
)
{
sds
*
aclrules
=
listNodeValue
(
ln
);
sds
*
aclrules
=
listNodeValue
(
ln
);
user
*
u
=
ACLCreateUser
(
aclrules
[
0
],
sdslen
(
aclrules
[
0
]));
sds
username
=
aclrules
[
0
];
user
*
u
=
ACLCreateUser
(
username
,
sdslen
(
username
));
if
(
!
u
)
{
if
(
!
u
)
{
serverLog
(
LL_WARNING
,
u
=
ACLGetUserByName
(
username
,
sdslen
(
username
));
"Error loading ACLs: user '%s' specified multiple times"
,
serverAssert
(
u
!=
NULL
);
aclrules
[
0
]);
ACLSetUser
(
u
,
"reset"
,
-
1
);
return
C_ERR
;
}
}
/* Load every rule defined for this user. */
/* Load every rule defined for this user. */
...
...
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