Bug 677668 - RFE: rlRun for non-root users ?
RFE: rlRun for non-root users ?
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dalibor Pospíšil
Fedora Extras Quality Assurance
: Patch, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-15 09:28 EST by Milos Malik
Modified: 2015-07-23 06:02 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-23 06:02:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rlRunAsUser: new function with tests (4.80 KB, patch)
2011-05-11 08:02 EDT, Petr Muller
no flags Details | Diff

  None (edit)
Description Milos Malik 2011-02-15 09:28:00 EST
Description of problem:
I would like to see some kind of rlRun function which is able to run a command under identity of specified user. Such a function will significantly decrease the number of rlRun "su ..." statements in my tests and all steps in my tests will be logged (journaled) as if they were run with rlRun.

Actual results:
  rlRun "su -l -c \"vncserver\" user12345"

Expected results:
  rlUserRun user12345 "vncserver"
Comment 1 Petr Muller 2011-02-23 05:00:35 EST
Would love to see this one
Comment 2 Petr Muller 2011-05-11 08:02:46 EDT
Created attachment 498274 [details]
rlRunAsUser: new function with tests

The question is if this should be implemented as next option of rlRun, or as a separate function. This patch does the latter, and behaves as a dumb version (without the "advanced" options) of rlRun, with 'user' as a first parameter.
Comment 3 Fedora End Of Life 2012-08-06 16:04:22 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached 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 to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Fedora End Of Life 2012-08-06 16:04:22 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached 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 to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Fedora End Of Life 2013-12-21 09:54:41 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 6 Fedora End Of Life 2014-02-05 17:40:23 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 8 Petr Muller 2014-02-06 07:37:33 EST
Not sure about the question. The status of this RFE is clear: it's ASSIGNED, with a patch. Nobody reviewed the patch, nobody did anything else. I do not like the patch myself, because it would just cause 'make rlRunAsUser behave like rlRun' bugs to appear.
Comment 9 Ales Zelinka 2015-04-22 08:48:40 EDT
ksrot (cced) has use-case to run more than one command in a single non-root user session e.g. more than one rlRun. Maybe we should go back to the drawing board and discuss all the usecases for non-root execution and redesign the feature(s)?
Comment 10 Ales Zelinka 2015-04-22 08:50:05 EDT
possible duplicate: https://bugzilla.redhat.com/show_bug.cgi?id=814563

that supports Karel's use-case.
Comment 11 Karel Srot 2015-04-22 09:40:41 EDT
One example of my use-case:
Every sequence of commands that operates with environment/global variables is _uncomfortable_to_do_ in isolated rlRun calls. Such variable(s) would have to be passed to each rlRun command. It is not possible to modify a variable or define a new one within a rlRun command that would impact successive rlRun commands. Such variable definitions would have to be done from the outside. It is also difficult to pass the environment variable from the inside (need to use tmp files etc., too uncomfortable to make it often). Root interventions inside the non-root environment have unpleasant effect of newly created files being owned by root user and there could be also issues with incorrect selinux contexts.

The best alternative I was able to find out so far is to store whole sequence of commands in a shell script and execute them through su command. The downside is that rlRun (and other decorators) cannot be used in the non-root environment and therefore I loose all the comfort of the pretty logging and exit value checking. 

I.e. I do not need rlRun to execute commands as a regular user but I would rather appreciate rlRun (and other beakerlib functions) that could be executed by a regular user.
It could be worth of auditing&documenting which beakerlib commands could be (in theory) executed by a regular user, I guess some function to properly setup/cleanup the non-root environment/logs would be necessary too.

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