-
Notifications
You must be signed in to change notification settings - Fork 188
src/cmd-build: allow chcon to fail #388
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
Conversation
| # Clear the MCS SELinux labels | ||
| # See https://github.com/coreos/coreos-assembler/issues/292 | ||
| chcon -vl s0 "${img_qemu}" | ||
| chcon -vl s0 "${img_qemu}" || echo "chcon failed. This is expected if SELinux is not enabled" |
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.
How about something like:
if [[ $(getenforce || :) == Enforcing ]]; then
chcon ...
fi?
That way, we make sure we still fail if SELinux is enabled and we're missing perms or something.
70a0abc to
8e48a51
Compare
|
Pushed a fix, using |
|
Hmm, OK so this is a bit more complicated actually. Inside the container, selinuxfs isn't mounted, so |
|
are you running unprivileged? note that robert also was able to reproduce: #294 (review) |
|
Yes - I previously hit a "permission denied" during Checking out latest master at d48e618, mounting the scripts, and running (running on F29) |
This is fail if SELinux isn't enabled and abort the build. Print a message instead of dying.
8e48a51 to
0bab202
Compare
|
Ok, switched back to what it was originally. |
|
OK, reproduced this now: fixed in #394, which also drops the |
|
Superceded by #394 |
This is fail if SELinux isn't enabled and abort the build. Print a
message instead of dying.