-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/posix: validate mode argument in posix_mkfifo() #21102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
kind of make sense, |
ext/posix/posix.c
Outdated
| RETURN_FALSE; | ||
| } | ||
|
|
||
| if (mode < 0 || (mode & ~0777)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... however I m unsure the mask is correct , should not it be ~07777 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0777 -> rwx rwx rwx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double checked, with FIFO these extra bits, while not wrong, are no-op. Your agument is valid. I ll defer the decision to the maintainer(s).
|
Looking good except I tend to disagree where the test is. Ideally, it would have its own dedicated test (and testing more broadly the boundaries). |
|
Looking good now ; let's it cool down for a while though. |
Validate the mode argument in
posix_mkfifo()and throw aValueErrorfor invalid permission values.