Replication fake connection should inhereit the user and permission of the real connection

Former-commit-id: dc2b3cf4f8965c329ea23d78c33592c99f16b109
This commit is contained in:
John Sully 2019-04-18 22:07:35 -04:00
parent b5e25f876f
commit 064abb0e80

View File

@ -3183,6 +3183,8 @@ void replicaReplayCommand(client *c)
// OK We've recieved a command lets execute
client *cFake = createClient(-1, c->iel);
cFake->lock.lock();
cFake->authenticated = c->authenticated;
cFake->puser = c->puser;
cFake->querybuf = sdscat(cFake->querybuf,(sds)ptrFromObj(c->argv[2]));
selectDb(cFake, c->db->id);
processInputBuffer(cFake, (CMD_CALL_FULL & (~CMD_CALL_PROPAGATE)));