Skip to content

Fixes for privileged path#564

Merged
jlebon merged 3 commits intocoreos:masterfrom
jlebon:pr/fix-privs
Jun 24, 2019
Merged

Fixes for privileged path#564
jlebon merged 3 commits intocoreos:masterfrom
jlebon:pr/fix-privs

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.

@cgwalters
Copy link
Member

LGTM with or with the suggested changes.

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

jlebon added 3 commits June 21, 2019 14:31
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