Skip to content

Handle error on redis, when redis socket directory does not exist.#8086

Open
KhDanial wants to merge 1 commit intoredis:unstablefrom
KhDanial:unstable
Open

Handle error on redis, when redis socket directory does not exist.#8086
KhDanial wants to merge 1 commit intoredis:unstablefrom
KhDanial:unstable

Conversation

@KhDanial
Copy link

when we want to run redis server on system,it is possible that system does not have any directory for /var/run/redis
for this reason we add some code to check if we do not have this directory, created this directory with given permission, rerecursively

@madolson
Copy link
Contributor

I'm still not convinced the default behavior should be to create the directory path. I would be open to it being a separate option. Do others have thoughts?

@KhDanial
Copy link
Author

KhDanial commented Nov 25, 2020

I'm still not convinced the default behavior should be to create the directory path. I would be open to it being a separate option. Do others have thoughts?

you mean we set some config for this?
if user set option to create directory as default behavior, we create it otherwise not?

@t00350320
Copy link

i don't agree with this merge request. Environment variables should be checked carefully by users themselves if they want to deploy redis. Because redis can't and should not to match so many operating systems!!!

@yossigo
Copy link
Collaborator

yossigo commented Nov 26, 2020

I agree with @madolson about this, I don't think Redis should be doing this kind of setup and it's also not a generally common practice with other similar services. @KhDanial Is there any specific reason you can't just verify that the directory exists and with the right permissions before starting the redis-server process?

BTW this implementation also introduces a security vulnerability as it uses an unbounded strcpy() to copy a user-provided string into a stack buffer.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] "No such file or directory" error, when redis unixsocket does not exist

5 participants