Bug 677668 - RFE: rlRun for non-root users ?
Summary: RFE: rlRun for non-root users ?
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dalibor Pospíšil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-15 14:28 UTC by Milos Malik
Modified: 2015-07-23 10:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-23 10:02:43 UTC
Type: ---
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 814563 0 low ASSIGNED [RFE] Create a simple way how to run tests or part of them as ordinary user 2021-02-22 00:41:40 UTC

Internal Links: 814563

Description Milos Malik 2011-02-15 14:28:00 UTC
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 10:00:35 UTC
Would love to see this one

Comment 2 Petr Muller 2011-05-11 12:02:46 UTC
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 20:04:22 UTC
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 20:04:22 UTC
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 14:54:41 UTC
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 22:40:23 UTC
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 12:37:33 UTC
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 12:48:40 UTC
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 12:50:05 UTC
possible duplicate: https://bugzilla.redhat.com/show_bug.cgi?id=814563

that supports Karel's use-case.

Comment 11 Karel Srot 2015-04-22 13:40:41 UTC
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.