Skip to content

Conversation

@arshidkv12
Copy link
Contributor

Validate the mode argument in posix_mkfifo() and throw a ValueError for invalid permission values.

@devnexen
Copy link
Member

kind of make sense, posix_mknod has its mode checked out too.

RETURN_FALSE;
}

if (mode < 0 || (mode & ~0777)) {
Copy link
Member

@devnexen devnexen Jan 31, 2026

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0777 -> rwx rwx rwx

Copy link
Member

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).

@arshidkv12 arshidkv12 requested a review from devnexen January 31, 2026 17:25
@devnexen
Copy link
Member

devnexen commented Jan 31, 2026

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).

@devnexen
Copy link
Member

devnexen commented Feb 1, 2026

Looking good now ; let's it cool down for a while though.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants