Skip to content
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

Support mounting on SELinux #251

Merged
merged 1 commit into from
Aug 25, 2019
Merged

Support mounting on SELinux #251

merged 1 commit into from
Aug 25, 2019

Conversation

cyplo
Copy link
Contributor

@cyplo cyplo commented Jan 19, 2019

This should allow cross to work on both non-SELinux enabled systems
and SELinux ones.

I've tested on Fedora 29 for SELinux system.

Fixes #112 that was originally reported from Fedora as well I believe.

@Dylan-DPC-zz
Copy link

Thanks
bors: try

bors bot added a commit that referenced this pull request Jan 19, 2019
@bors
Copy link
Contributor

bors bot commented Jan 19, 2019

try

Build failed

@cyplo
Copy link
Contributor Author

cyplo commented Jan 20, 2019

Heya ! I've seen some failures on CI but not sure if they're related - it seems that he build is starting without problems, is just that some of the things seem to be not behind feature gates anymore in 1.33 I think ?
cc @Dylan-DPC

@cyplo
Copy link
Contributor Author

cyplo commented Jan 20, 2019

I traced the problem and proposed a fix to the underlying library: rust-lang/compiler-builtins#272

@Dylan-DPC-zz
Copy link

@cyplo Thanks. I was about to send them a PR with the change. Will have to wait for them to release a new version and then for the dependent crate to make the change or allow the build for latest nightly to fail (or disable this)

@cyplo
Copy link
Contributor Author

cyplo commented Jan 23, 2019

Heya @Dylan-DPC - the PR to compiler-builtins got merged. Do you know which library to ping to be updated with this change ? If not - I can try tracing this later.

@Dylan-DPC-zz
Copy link

@cyplo actually we don't have to. we just have to wait for compiler-builtins to release a new version and cargo will pick the latest version when resolving the dependencies.

@Dylan-DPC-zz
Copy link

bors: try

bors bot added a commit that referenced this pull request Feb 9, 2019
@bors
Copy link
Contributor

bors bot commented Feb 9, 2019

try

Build failed

@cyplo
Copy link
Contributor Author

cyplo commented Feb 10, 2019

Heya @Dylan-DPC - it seems that the build failed but for an unrelated reason - E: Unable to locate package linux-image-4.19.0-1-powerpc64:ppc64 - could you take a look ?

@Dylan-DPC-zz
Copy link

i'm not sure what's causing that. Will investigate.

@cyplo
Copy link
Contributor Author

cyplo commented Feb 10, 2019

Thank you !

@Disasm
Copy link

Disasm commented Feb 26, 2019

Same problem here: #255
Marking this PR as blocked.

@Disasm Disasm added T-tools S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. labels Feb 26, 2019
@Disasm Disasm mentioned this pull request Feb 26, 2019
This should allow `cross` to work on both non-SELinux enabled systems
and SELinux ones.
@cyplo
Copy link
Contributor Author

cyplo commented Aug 18, 2019

Heya @Dylan-DPC - I solved the conflicts in this PR and force-pushed - it seems that Bors is stuck perhaps ? Not sure what to do next tbh. Thanks btw :)

@reitermarkus
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Aug 25, 2019
251: Support mounting on SELinux r=reitermarkus a=cyplo

This should allow `cross` to work on both non-SELinux enabled systems
and SELinux ones.

I've tested on Fedora 29 for SELinux system.

Fixes #112 that was originally reported from Fedora as well I believe.

271: Minor improvements to wording r=reitermarkus a=spl

* Fix a typo in "QEMU bug sand"
* Add a link for QEMU
* Clarify and simplify various other things about the wording

The diff looks worse than the changes are. I tried to keep to the 80-column width since it looked like the rest of the text was that way. GitHub's “rich diff” seems to help here.

Co-authored-by: Cyryl Płotnicki <[email protected]>
Co-authored-by: Sean Leather <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 25, 2019

Timed out (retrying...)

bors bot added a commit that referenced this pull request Aug 25, 2019
251: Support mounting on SELinux r=reitermarkus a=cyplo

This should allow `cross` to work on both non-SELinux enabled systems
and SELinux ones.

I've tested on Fedora 29 for SELinux system.

Fixes #112 that was originally reported from Fedora as well I believe.

Co-authored-by: Cyryl Płotnicki <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 25, 2019

Build succeeded

@bors bors bot merged commit 9670884 into cross-rs:master Aug 25, 2019
@cyplo cyplo deleted the selinux-support branch August 26, 2019 18:30
bors bot added a commit that referenced this pull request Jul 19, 2022
962: Fix SELinux labels to allow shared use. r=Emilgardis a=Alexhuszagh

Ensure that the volumes are not mounted as private, unshared volumes since we might mount with the host filesystem. This also fixes permissions issues with reading data from a mounted volume using a rootless container engine.

Fixes a bug introduced in #251.
Closes #961.

This is because the `Z` SELinux label assumes the data is not shared between containers and not being used by the host, as documented below:

> If you use selinux you can add the z or Z options to modify the selinux label of the host file or directory being mounted into the container. This affects the file or directory on the host machine itself and can have consequences outside of the scope of Docker.
> 
> - The z option indicates that the bind mount content is shared among multiple containers.
> - The Z option indicates that the bind mount content is private and unshared.
> 
> Use extreme caution with these options. Bind-mounting a system directory such as /home or /usr with the Z option renders your host machine inoperable and you may need to relabel the host machine files by hand.

Prior to this, we used the `Z` label, when we should have been using the `z` label.

Co-authored-by: Alex Huszagh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. T-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross not compatible with SELinux
4 participants