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

Fixes for privileged path #564

Merged
merged 3 commits into from
Jun 24, 2019
Merged

Fixes for privileged path #564

merged 3 commits into from
Jun 24, 2019

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jun 21, 2019

See individual commit messages.

@jlebon jlebon mentioned this pull request Jun 21, 2019
Copy link
Contributor

@ajeddeloh ajeddeloh left a comment

Choose a reason for hiding this comment

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

LGTM with or with the suggested changes.

src/supermin-init-prelude.sh Outdated Show resolved Hide resolved
src/cmdlib.sh Outdated Show resolved Hide resolved
@cgwalters
Copy link
Member

LGTM with or with the suggested changes.

You can have any color you want as long as it's black!

In privileged mode, there is no `cache.qcow2` since we compose directly
on the host. Teach the supermin goop to skip `mount` and `fstrim` in
that case.
Only root can `chown` things. Though we're root in the supermin
appliance, files we create on the 9p mount are all created with our
uid, of course. Doing `chown -R` like this worked before because
`chown`ing to yourself isn't an error.

But now with the Anaconda removal work, we use the supermin path even
when privileged. Except we don't have a `cache.qcow2`, so our root-owned
cached (since rpm-ostree is still run as real root) was showing through
the 9p mount, and `chown` was no longer a no-op and would of course
fail.
Bash doesn't like using `-ne` for string comparisons:

    [: x86_64: integer expression expected

We need to use `!=` instead.
Copy link
Contributor

@ajeddeloh ajeddeloh left a comment

Choose a reason for hiding this comment

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

LGTM

@jlebon jlebon merged commit 212d8c3 into coreos:master Jun 24, 2019
@jlebon jlebon deleted the pr/fix-privs branch July 6, 2020 20:32
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