Bug 528577 - febootstrap-2.4 cannot complete chroot construction when running as root
febootstrap-2.4 cannot complete chroot construction when running as root
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: febootstrap (Show other bugs)
11
All Linux
medium Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-12 18:52 EDT by Michael Stone
Modified: 2010-06-28 11:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 11:00:45 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)

  None (edit)
Description Michael Stone 2009-10-12 18:52:50 EDT
Description of problem:

febootstrap-2.4 fails to finish successfully when run as root when it calls febootstrap-run to clean up the chroot's yum cache because febootstrap-run tries to use fakechroot even when it is running as uid 0 and should be using chroot.

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

febootstrap-2.4-1

How reproducible:

Always.

Steps to Reproduce:
1. Run sudo febootstrap fedora-11 ./f11
  
Actual results:

febootstrap downloads and install packages, then crashes when it tries to empty the chroot's /var/cache/yum.

Expected results:

febootstrap should exit with return code 0 after installing packages.

Additional info:

This behavior is a regression from febootstrap-2.1, which was able to successfully construct fedora chroots as root.
Comment 1 Richard W.M. Jones 2009-10-13 05:03:02 EDT
I really don't think it's a good idea to run febootstrap
as root.  Is it necessary to do this or can you run
febootstrap as non-root?

I'd actually rather remove the ability to run as root TBH ...
Comment 2 Alexey Torkhov 2009-10-13 09:05:45 EDT
Patch in bug 525778 or bug 528687 should fix this, as "crash" in febootstrap-2.4 I see is an error "febootstrap-run: ...: not a root filesystem".
Comment 3 Michael Stone 2009-10-13 10:20:25 EDT
(In reply to comment #1)
> I really don't think it's a good idea to run febootstrap
> as root.  Is it necessary to do this or can you run
> febootstrap as non-root?

The ability to generate honest Fedora chroots as root is important to me because I write software (i.e. Rainbow, which I want to test in Fedora chroots) which relies completely on the actual complete behavior of the Unix discretionary access control, POSIX ACLs, capabilities, glibc NSS, and network namespaces subsystems -- i.e. on the proper functioning of the kernel's access control APIs -- which in turn require that I call them with appropriate privileges. I would be pleasantly surprised to learn that fakeroot provided adequate simulation of all of these APIs.

> I'd actually rather remove the ability to run as root TBH ...  

I find it extremely valuable that febootstrap and debootstrap are "equivalent up to choose of distro". Febootstrap is much easier for me to use than mock for this reason.

Do you want to remove it because you think it's unsafe, because it's hard to maintain, or for some other reason? (Or for some combination of reasons?)
Comment 4 Richard W.M. Jones 2009-10-13 10:35:37 EDT
I mean, I'm not going to stop you if you find it useful.

The real problem is that %post scripts might do *anything*,
in particular interacting with system daemons or installing
SELinux policy.  These sorts of things aren't prevented by
chroot (but they are if you don't run them as root at all!)
Comment 5 Michael Stone 2009-10-13 10:59:26 EDT
That is indeed a risk that I take in testing software these days and, as you say, it is a fine reason to prefer unprivileged installation whenever possible. Tough luck for me, I think. :)

(However, if you find that you want to make it slightly harder for people to shoot themselves in the foot unawares, then maybe a "-f-yes-I-really-mean-it" flag would be appropriate for uid-0 installation?)
Comment 6 Bug Zapper 2010-04-28 06:48:48 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 7 Bug Zapper 2010-06-28 11:00:45 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 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.

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.