Bug 97458

Summary: rpm-4.2-1 don't work with uid != 0
Product: [Retired] Red Hat Linux Reporter: FĂ©liciano Matias <feliciano.matias>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-19 13:02:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description FĂ©liciano Matias 2003-06-16 07:40:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
rpm -i or -U with the flag --justdb don't work when the user is not root.

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

How reproducible:
Always

Steps to Reproduce:
Example :
[f.matias@one tmp]$ id
uid=500(f.matias) gid=100(users) groupes=100(users)
[f.matias@one tmp]$ rpm --initdb --dbpath /tmp/rpmdb
[f.matias@one tmp]$ rpm -i --justdb --noscripts --notriggers --dbpath /tmp/rpmdb
setup-2.5.25-1.noarch.rpm
warning: setup-2.5.25-1.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e
[f.matias@one tmp]$ rpm -q -a --dbpath /tmp/rpmdb
[# nothing has been inserted.]
[f.matias@one tmp]$ su
Password:
[root@one tmp]# rm -r -f rpmdb/
[root@one tmp]# rpm --initdb --dbpath /tmp/rpmdb
[root@one tmp]# rpm -i --justdb --noscripts --notriggers --dbpath /tmp/rpmdb
setup-2.5.25-1.noarch.rpm
warning: setup-2.5.25-1.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e
[root@one tmp]# rpm -q -a --dbpath /tmp/rpmdb
setup-2.5.25-1
[root@one tmp]#


Actual Results:  if the user not root then the package is not inserted in the
rpm database.

Expected Results:  package inserted in the rpm database.

Additional info:

Comment 1 Jeff Johnson 2003-06-19 13:02:53 UTC
Both -i and -U depend on chroot(2), which is root only.