Bug 163581 - rpm -qp --list -verbose joins owner and group when owner has 8 or more chars
rpm -qp --list -verbose joins owner and group when owner has 8 or more chars
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-19 03:05 EDT by Tomas Honzak
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-25 21:30:02 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)
Patch File: query.c Status: Locally Modified Working revision: 2.173 Repository revision: 2.173 /cvs/devel/rpm/lib/query.c,v (491 bytes, patch)
2005-07-20 07:56 EDT, Tomas Honzak
no flags Details | Diff

  None (edit)
Description Tomas Honzak 2005-07-19 03:05:12 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Description of problem:
When file owner has 8 or more chars, rpm -qp -l -v writes owner and group together. 


Version-Release number of selected component (if applicable):
rpm-4.2.1-4.4, CVS HEAD

How reproducible:
Always

Steps to Reproduce:
1. take any package that has file owner's name with 8 or more chars
2. rpm -qp -l -v package.rpm
 
I have checked different releases of rpm v4 on different platforms and also the current version in CVS and the problem persists. A patch that solves the issue (done against latest revision in CVS) is below.

Actual Results:  drwxrwxr-x    2 gbgadmingbg                 0 Feb 25 17:50 /opt/gbg-1/bin
-r-xr-xr-x    1 gbgadmingbg             26728 Feb 25 17:50 /opt/gbg-1/bin/encode_keychange
-r-xr-xr-x    1 gbgadmingbg             15478 Feb 25 17:50 /opt/gbg-1/bin/fixproc
(...)

Expected Results:  drwxrwxr-x    2 gbgadmin gbg                 0 Feb 25 17:50 /opt/gbg-1/bin
-r-xr-xr-x    1 gbgadmin gbg             26728 Feb 25 17:50 /opt/gbg-1/bin/encode_keychange
-r-xr-xr-x    1 gbgadmin gbg             15478 Feb 25 17:50 /opt/gbg-1/bin/fixproc
(...)

Additional info:

Patch follows:

diff -Naur rpm.orig/lib/query.c rpm/lib/query.c
--- rpm.orig/lib/query.c        2005-07-18 15:47:53.000000000 +0200
+++ rpm/lib/query.c     2005-07-18 16:10:03.000000000 +0200
@@ -103,7 +103,7 @@
        (void)strftime(timefield, sizeof(timefield) - 1, fmt, tm);
     }
 
-    sprintf(te, "%s %4d %-8s%-8s %10s %s %s", perms,
+    sprintf(te, "%s %4d %-8s %-8s %10s %s %s", perms,
        (int)nlink, ownerfield, groupfield, sizefield, timefield, namefield);
     perms = _free(perms);
 }
Comment 1 Tomas Honzak 2005-07-20 07:56:57 EDT
Created attachment 116972 [details]
Patch 
File: query.c           Status: Locally Modified

   Working revision:    2.173
   Repository revision: 2.173   /cvs/devel/rpm/lib/query.c,v
Comment 2 Paul Nasrat 2005-07-20 08:04:12 EDT
Jeff - seems obvious to me, shall I commit on HEAD / 4.4.x?
Comment 3 Jeff Johnson 2005-10-25 21:30:02 EDT
Fixed in rpm-4.4.3-0.24 when built.

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