mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 01:31:21 +00:00
Merged Pietern patch for VM key args helper function. Fixed an obvious bug in the redis-cli passwd auth stuff
This commit is contained in:
@ -312,21 +312,16 @@ static int cliLogin(int fd)
|
||||
int retval = 1;
|
||||
sds cmd;
|
||||
char type;
|
||||
if (config.authpw != "")
|
||||
{
|
||||
if (config.authpw[0] != '\0') {
|
||||
cmd = sdsempty();
|
||||
cmd = sdscatprintf(cmd,"AUTH %s\r\n",config.authpw);
|
||||
anetWrite(fd,cmd,sdslen(cmd));
|
||||
anetRead(fd,&type,1);
|
||||
if (type == '+')
|
||||
{
|
||||
retval = 0;
|
||||
}
|
||||
int ret2 = cliReadSingleLineReply(fd,1);
|
||||
if (ret2)
|
||||
{
|
||||
close(fd);
|
||||
}
|
||||
} else {
|
||||
retval = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user