diff options
author | antirez <antirez@gmail.com> | 2019-02-01 11:37:20 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-02-01 11:37:28 +0100 |
commit | 1769c222486d1deb33b394899eccab35be975c96 (patch) | |
tree | d824770c6e19a701bbf125e55739b3a241cf8aac | |
parent | b6372f16c414e5f8a20164e6b1b82fc4c133be68 (diff) | |
download | redis-1769c222486d1deb33b394899eccab35be975c96.tar.gz |
ACL: set modules help clients to the root user.
It does not make much sense to limit what modules can do: the admin
should instead limit what module commnads an user may call. So
RedisModule_Call() and other module operations should be able to execute
everything they want: the limitation should be posed by the API exported
by the module itself.
-rw-r--r-- | src/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 9c24bfe2b..81982ba76 100644 --- a/src/module.c +++ b/src/module.c @@ -2697,6 +2697,7 @@ RedisModuleCallReply *RM_Call(RedisModuleCtx *ctx, const char *cmdname, const ch /* Create the client and dispatch the command. */ va_start(ap, fmt); c = createClient(-1); + c->user = NULL; /* Root user. */ argv = moduleCreateArgvFromUserFormat(cmdname,fmt,&argc,&flags,ap); replicate = flags & REDISMODULE_ARGV_REPLICATE; va_end(ap); @@ -4660,6 +4661,7 @@ void moduleInitModulesSystem(void) { moduleKeyspaceSubscribers = listCreate(); moduleFreeContextReusedClient = createClient(-1); moduleFreeContextReusedClient->flags |= CLIENT_MODULE; + moduleFreeContextReusedClient->user = NULL; /* root user. */ moduleRegisterCoreAPI(); if (pipe(server.module_blocked_pipe) == -1) { |