mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 03:33:28 +00:00
Sentinel: Reject config from STDIN
Sentinel needs to die with a more accurate error message when attempted to open a config from STDIN. See: https://groups.google.com/forum/#!topic/redis-db/sYx7VNMWaNM
This commit is contained in:
parent
60c448b584
commit
681de88df4
@ -3576,6 +3576,13 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
j++;
|
||||
}
|
||||
if (server.sentinel_mode && configfile && *configfile == '-') {
|
||||
redisLog(REDIS_WARNING,
|
||||
"Sentinel config from STDIN not allowed.");
|
||||
redisLog(REDIS_WARNING,
|
||||
"Sentinel needs config file on disk to save state. Exiting...");
|
||||
exit(1);
|
||||
}
|
||||
if (configfile) server.configfile = getAbsolutePath(configfile);
|
||||
resetServerSaveParams();
|
||||
loadServerConfig(configfile,options);
|
||||
|
Loading…
Reference in New Issue
Block a user