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

run: ensure that stdio pipes are labeled correctly #3630

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

nalind
Copy link
Member

@nalind nalind commented Nov 16, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Label stdio pipes to ensure that processes we run can read through /dev/stdin and write through the /dev/stdout and /dev/stderr links.

How to verify it

New integration test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 16, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 16, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Nov 16, 2021

This LGTM, but I would like to get this fixed in opencontainers/selinux.

rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 16, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 16, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 16, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 18, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@umohnani8
Copy link
Member

LGTM

rhatdan added a commit to rhatdan/ociselinux that referenced this pull request Nov 18, 2021
SELinux C library has two functions for dealing with file labels, one
which follows symlinks and one that does not.

Golang bindings should work the same way.  The lack of this function is
resulting in containers/buildah#3630 which has
to hack around the problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2021

@nalind Could you change this to use https://github.com/opencontainers/selinux/releases/tag/v1.10.0 and just use label.Relabel().

Label stdio pipes to ensure that processes we run can read through
/dev/stdin and write through the /dev/stdout and /dev/stderr links.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@nalind
Copy link
Member Author

nalind commented Nov 19, 2021

@nalind Could you change this to use https://github.com/opencontainers/selinux/releases/tag/v1.10.0 and just use label.Relabel().

Done.

@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2021

/lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/bug Categorizes issue or PR as related to a bug. lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants