From 8dfeb4fba129662364cb630fafc95f6b1c6fd781 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 21 Jan 2019 18:21:02 +0100 Subject: [PATCH] ACL: setuser reset implemented. --- src/acl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/acl.c b/src/acl.c index 3c374631..0a72ffb7 100644 --- a/src/acl.c +++ b/src/acl.c @@ -342,6 +342,11 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) { ACLSetUserCommandBit(u,id,0); u->flags &= ~USER_FLAG_ALLCOMMANDS; 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 { errno = EINVAL; return C_ERR;