mirror of https://github.com/redis/redis.git
				
				
				
			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.
This commit is contained in:
		
							parent
							
								
									b6372f16c4
								
							
						
					
					
						commit
						1769c22248
					
				| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue