Bug 1297473 - unprivileged users unable to use 'rpm-ostree status'
unprivileged users unable to use 'rpm-ostree status'
Product: Fedora
Classification: Fedora
Component: rpm-ostree (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Colin Walters
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-11 10:39 EST by Micah Abbott
Modified: 2016-12-20 12:47 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-12-20 12:47:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Micah Abbott 2016-01-11 10:39:43 EST
Description of problem:

When an unprivileged user tries to use the 'rpm-ostree status' command, an error is returned.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Boot into F23 Atomic v23.33
2.  Run 'rpm-ostree status' as a normal, unprivileged user

Actual results:

$ rpm-ostree status
error: Rejected send message, 2 matched rules; type="method_call", sender=":1.14" (uid=1001 pid=1033 comm="rpm-ostree status ") interface="org.projectatomic.rpmostree1.Sysroot" member="GetOS" error name="(unset)" requested_reply="0" destination=":1.11" (uid=0 pid=1013 comm="/usr/libexec/rpm-ostreed ")

Expected results:

$ rpm-ostree status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME            REFSPEC                                                
* 2015-12-14 10:16:00     23.33     a40cbd4a80     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     
  2015-11-22 02:14:34     23.16     e67b8ed84b     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     

Additional info:

This looks like a regression from previous behavior.  In older versions of 'rpm-ostree', a normal user was able to use the 'rpm-ostree status' command to retrieve the info (see below).

$ rpm -q rpm-ostree
$ rpm-ostree status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME            REFSPEC                                                
* 2015-11-22 02:14:34     23.16     e67b8ed84b     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     
  2015-12-14 10:16:00     23.33     a40cbd4a80     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host
Comment 1 Matthew Barnes 2016-01-11 17:55:00 EST
This sounds like the regression in ostree that I fixed upstream last month:

Which was an unintended side-effect of:

But AFAICT, there hasn't been an upstream release since before that regression was introduced and fixed.  The latest release was 2015.11 on Dec 4th, and Alex didn't commit those changes until Dec 14th.

What's your ostree package version?
Comment 2 Matthew Barnes 2016-01-11 20:05:12 EST
Disregard my above comment.  This is something else.

Right now the rpm-ostree daemon uses a blanket security policy of letting only the root user call a method.  That is, any method -- even harmless ones.

We need to poke some holes in that.

For this particular case, the client is merely calling Sysroot.GetOS() to find out what osname to use.  Anyone should be allowed to do that.
Comment 3 Matthew Barnes 2016-01-12 17:24:37 EST
Comment 4 Matthew Barnes 2016-01-13 10:42:26 EST
Above pull request got merged, so this should be fixed upstream now.
Comment 5 Jen Krieger 2016-01-27 09:47:09 EST
Micah - can you take a peek and verify for us? :)
Comment 6 Micah Abbott 2016-03-29 15:36:25 EDT
Made use of 'ostree admin unlock' and tested this functionality with the new rpm-ostree-2016.1-2.fc23.x86_64 package.

[cloud-user@micah-f23-ah-vm1 ~]$ id
uid=1001(cloud-user) gid=1001(cloud-user) groups=1001(cloud-user) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[cloud-user@micah-f23-ah-vm1 ~]$ rpm-ostree --version
rpm-ostree 2016.1
[cloud-user@micah-f23-ah-vm1 ~]$ rpm-ostree status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME            REFSPEC                                                   
* 2016-03-26 15:08:22     23.92       2f80c5d591     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/testing/docker-host
  2016-03-07 03:45:47     23.79       1a68c7b9c0     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host
Comment 7 Fedora End Of Life 2016-11-24 09:50:57 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2016-12-20 12:47:21 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.