Skip to content

Conversation

@dustymabe
Copy link
Member

If we don't do this we end up with an image with MCS labels which means
that a subsequent run of a container (i.e. coreos-assembler run) will
fail.

With this we go from:

system_u:object_r:container_file_t:s0:c255,c505

to:

system_u:object_r:container_file_t:s0

Fixes #292

@cgwalters
Copy link
Member

cgwalters commented Jan 24, 2019

Hmmm....right, from #292 (comment)
it must be related to libvirt doing SVirt.

I imagine we could tell libvirt to disable svirt? In my dev environment I'm seeing:

$ virsh dominfo 1
Name:           coreos-inst-4507-1548362421
...
Security model: none

And I just verified I'm not seeing this issue (and am seeing the Security model: none) with the official container (although mine is a bit out of date and the hotel wifi here is terrible).

@dustymabe
Copy link
Member Author

yeah. my original patch for this added something like --security none to the virt-install invocation, but that either didn't work or the subsequent libguestfs calls still caused the file to have MCS labels. This patch is what I ended up with without digging into a ball of wax.

@dustymabe dustymabe requested a review from cgwalters January 27, 2019 17:31
@dustymabe
Copy link
Member Author

@cgwalters - WDYT? is it possible I'm doing something wrong?

@cgwalters
Copy link
Member

I guess what I need to understand about this is whether it's specific to the unprivileged path - things have been working for me privileged. I'll test that other PR. libvirt shouldn't be doing the chmod regardless with our setup.

@dustymabe
Copy link
Member Author

I guess what I need to understand about this is whether it's specific to the unprivileged path - things have been working for me privileged. I'll test that other PR. libvirt shouldn't be doing the chmod regardless with our setup.

maybe: moby/moby@b63ce33 ?

Copy link
Contributor

@rfairley rfairley left a comment

Choose a reason for hiding this comment

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

LGTM - working well on my end after build with the script mounted and coreos-assembler run (previously gave avc denial).

If we don't do this we end up with an image with MCS labels which means
that a subsequent run of a container (i.e. `coreos-assembler run`) will
fail.

With this we go from:

```
system_u:object_r:container_file_t:s0:c255,c505
```

to:

```
system_u:object_r:container_file_t:s0
```

Fixes #292
@dustymabe
Copy link
Member Author

thanks @rfairley - merging now.

@dustymabe dustymabe merged commit 2b0df3f into coreos:master Jan 30, 2019
@dustymabe dustymabe deleted the selinux branch January 30, 2019 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants