-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
utils: mkdirall: fix handling of suid/sgid bits #4400
Conversation
74139b6
to
85b09d6
Compare
We reintroduced this once already because it is quite easy to miss this subtle aspect of proc mounting. The recent migration to securejoin.MkdirAllInRoot could have also inadvertently reintroduced this (though it didn't). Signed-off-by: Aleksa Sarai <[email protected]>
14a5320
to
079ebc3
Compare
@lifubang Can you verify this fixes the |
Has verified that it has indeed fixed the dind issue. Thanks. |
079ebc3
to
a93a25e
Compare
I've released a new version of filepath-securejoin, so this should be ready now. |
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.
LGTM, thanks!
It turns out that the suid and sgid mode bits are silently ignored by Linux (though the sticky bit is honoured), and some users are requesting mode bits that are ignored. While returning an error (as securejoin does) makes some sense, this is a regression. Ref: cyphar/filepath-securejoin#23 Fixes: dd827f7 ("utils: switch to securejoin.MkdirAllHandle") Signed-off-by: Aleksa Sarai <[email protected]>
This includes a fix for the handling of S_ISGID directories. Signed-off-by: Aleksa Sarai <[email protected]>
Signed-off-by: Aleksa Sarai <[email protected]>
a93a25e
to
d8844e2
Compare
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.
Still LGTM
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.
LGTM
Draft until filepath-securejoin v0.3.2 is released.This fixes some minor issues with suid/sgid bits introduced by #4393.
/cc @lifubang
Fixes #4401
Signed-off-by: Aleksa Sarai [email protected]