ACL LOG: also log ACL errors in the scripting/MULTI ctx.
This commit is contained in:
parent
eef1489240
commit
bc168c91ec
@ -177,8 +177,10 @@ void execCommand(client *c) {
|
|||||||
must_propagate = 1;
|
must_propagate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int acl_retval = ACLCheckCommandPerm(c,NULL);
|
int acl_keypos;
|
||||||
|
int acl_retval = ACLCheckCommandPerm(c,&acl_keypos);
|
||||||
if (acl_retval != ACL_OK) {
|
if (acl_retval != ACL_OK) {
|
||||||
|
addACLLogEntry(c,acl_retval,acl_keypos);
|
||||||
addReplyErrorFormat(c,
|
addReplyErrorFormat(c,
|
||||||
"-NOPERM ACLs rules changed between the moment the "
|
"-NOPERM ACLs rules changed between the moment the "
|
||||||
"transaction was accumulated and the EXEC call. "
|
"transaction was accumulated and the EXEC call. "
|
||||||
|
@ -606,8 +606,10 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check the ACLs. */
|
/* Check the ACLs. */
|
||||||
int acl_retval = ACLCheckCommandPerm(c,NULL);
|
int acl_keypos;
|
||||||
|
int acl_retval = ACLCheckCommandPerm(c,&acl_keypos);
|
||||||
if (acl_retval != ACL_OK) {
|
if (acl_retval != ACL_OK) {
|
||||||
|
addACLLogEntry(c,acl_retval,acl_keypos);
|
||||||
if (acl_retval == ACL_DENIED_CMD)
|
if (acl_retval == ACL_DENIED_CMD)
|
||||||
luaPushError(lua, "The user executing the script can't run this "
|
luaPushError(lua, "The user executing the script can't run this "
|
||||||
"command or subcommand");
|
"command or subcommand");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user