Bug 789985 - gkrellm-daemon creates a system group without a reserved system UID/GID
Summary: gkrellm-daemon creates a system group without a reserved system UID/GID
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gkrellm
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-13 12:07 UTC by Exile In Paradise
Modified: 2013-02-13 14:30 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 14:30:05 UTC
Type: ---


Attachments (Terms of Use)

Description Exile In Paradise 2012-02-13 12:07:34 UTC
Description of problem:
yum install libvirt fails with:
Error in PREIN scriptlet in rpm package libvirt-0.9.6-4.fc16.x86_64
error: %pre(libvirt-0.9.6-4.fc16.x86_64) scriptlet failed, exit status 6

Version-Release number of selected component (if applicable):
libvirt.x86_64 0:0.9.6-4.fc16

How reproducible: 100% - multiple install attempts fail the exact same way
The googles, they show nothing on libvirt PREIN status 6

Steps to Reproduce:
1. yum install libvirt
2. install fails with Error in PREIN scriptlet in rpm package libvirt-0.9.6-4.fc16.x86_64
3. Do not pass GO, do not collect $200
  
Actual results:
Downloading Packages:
libvirt-0.9.6-4.fc16.x86_64.rpm    
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package libvirt-0.9.6-4.fc16.x86_64
error: %pre(libvirt-0.9.6-4.fc16.x86_64) scriptlet failed, exit status 6
Failed: libvirt-0.9.6-4.fc16.x86_64.rpm

Expected results:
Installed: libvirt-0.9.6-4.fc16.x86_64.rpm

Additional info:
Workaround was to use RPM to see a more descriptive error, remove the gkrell packages, and then yum install libvirt worked.

% wget http://download.fedoraproject.org/pub/fedora/linux/updates/16/x86_64/libvirt-0.9.6-4.fc16.x86_64.rpm

% rpm -Uvh libvirt-0.9.6-4.fc16.x86_64.rpm
groupadd: GID '107' already exists
useradd: group 'qemu' does not exist
error: %pre(libvirt-0.9.6-4.fc16.x86_64) scriptlet failed, exit status 6
error: libvirt-0.9.6-4.fc16.x86_64: install failed

% grep 107 /etc/group 
gkrellmd:x:107:

% sudo yum remove gkrell\*
% vi /etc/group
[ removed group gkrellmd by hand here ]

% sudo yum install libvirt
Installed: libvirt.x86_64 0:0.9.6-4.fc16

Comment 1 Daniel Berrangé 2012-02-13 12:24:35 UTC
The UID 107 is reserved for QEMU / libvirt to use, so gkrellm should never have been using it.


The problem here is the gkrellm-daemon RPM, which is creating a system group without a reserved UID. This causes it to hijack one of the UIDs reserved for other packages, in your case it happened to hijack libvirt's UIDs, but it could just as easily have hijacked other packages' UID allocations.

$ rpm -q --scripts gkrellm-daemon
preinstall scriptlet (using /bin/sh):
getent group gkrellmd >/dev/null || groupadd -r gkrellmd
getent passwd gkrellmd >/dev/null || \
useradd -r -g gkrellmd -M -d / -s /sbin/nologin -c "GNU Krell daemon" gkrellmd

Two things are required

 * gkrellm-daemon needs to ask for a fixed UID:GID pair, by filing a BZ against the 'setup' package in Fedora
 * Once allocated in the setup package,the gkrellm-daemon %post script should be modified to use the allocated UID:GID pair.

Comment 2 Ville Skyttä 2012-02-14 07:06:04 UTC
Given that 1) gkrellmd does not need a fixed uid for anything, 2) useradd assigns dynamic system uids starting from 1000 downwards nowadays minimizing chances for conflicts in the ~100 something range, 3) I personally believe that reserved/fixed uids/gids in packages are pretty much a broken concept, and 4) it'd make some sense only if done in every single package in Fedora that creates users/groups, as far as I'm concerned, this is a clear wontfix.  Will leave open for gkrellm primary maintainer comments though.

Comment 3 Fedora End Of Life 2013-01-16 13:38:21 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. 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 '16'.

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 16'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 16 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 to click on 
"Clone This Bug" 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 2013-02-13 14:30:10 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 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.