Bug 163581 - rpm -qp --list -verbose joins owner and group when owner has 8 or more chars
Summary: rpm -qp --list -verbose joins owner and group when owner has 8 or more chars
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-19 07:05 UTC by Tomas Honzak
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-26 01:30:02 UTC
Target Upstream Version:


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 11:56 UTC, Tomas Honzak
no flags Details | Diff

Description Tomas Honzak 2005-07-19 07:05:12 UTC
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 11:56:57 UTC
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 12:04:12 UTC
Jeff - seems obvious to me, shall I commit on HEAD / 4.4.x?

Comment 3 Jeff Johnson 2005-10-26 01:30:02 UTC
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.