From a0a4fb85ff33cddd2e71799f240ff3eda3cec01f Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 14 Jan 2019 13:22:56 +0100 Subject: [PATCH] ACL: Fix compilation by adding prototype and c->cmd fix. --- src/server.c | 2 +- src/server.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 49f62f37..4027b9ba 100644 --- a/src/server.c +++ b/src/server.c @@ -2690,7 +2690,7 @@ int processCommand(client *c) { /* Check if the user can run this command according to the current * ACLs. */ if (ACLCheckCommandPerm(c) == C_ERR) { - addReplyErrorFormat(c,"-NOPERM this user has no permissions to run the %s command", cmd->name); + addReplyErrorFormat(c,"-NOPERM this user has no permissions to run the %s command", c->cmd->name); } /* Only allow a subset of commands in the context of Pub/Sub if the diff --git a/src/server.h b/src/server.h index 973d3631..e2204231 100644 --- a/src/server.h +++ b/src/server.h @@ -1693,6 +1693,7 @@ void ACLInit(void); int ACLCheckUserCredentials(robj *username, robj *password); unsigned long ACLGetCommandID(const char *cmdname); user *ACLGetUserByName(const char *name, size_t namelen); +int ACLCheckCommandPerm(client *c); /* Sorted sets data type */