Bug 804812

Summary: idmapd logging of Local-Realms only lists the last realm
Product: Red Hat Enterprise Linux 6 Reporter: Steve Dickson <steved>
Component: nfs-utils-libAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: Juno.Krahn, steved, xinli, yanwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-lib-1.1.5-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 804152 Environment:
Last Closed: 2013-02-21 10:55:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 804152    
Bug Blocks:    

Description Steve Dickson 2012-03-19 20:11:01 UTC
+++ This bug was initially created as a clone of Bug #804152 +++

Created attachment 570654 [details]
Patch for libnfsidmap.c

Description of problem:
The list of local realms can be logged with a massage like the following:
   rpc.idmapd: libnfsidmap: Realms list: 'EXAMPLE2.COM'
Instead of printing a list of realms, only the last realm in the list is shown.

Version-Release number of selected component (if applicable):
0.24-7.fc16

How reproducible:
always

Steps to Reproduce:
1. edit /etc/idmapd.conf with Verbosity=1 and Local-Realms=A,B,C
2.
3.
  
Actual results:
rpc.idmapd: libnfsidmap: Realms list: 'C'

Expected results:
rpc.idmapd: libnfsidmap: Realms list: 'A' 'B' 'C'

Additional info:
Looking at the source, the list is built in a way that intends to append each realm to a string buffer, but instead overwrites the buffer each time. A patch is attached, which also has a few changes to the buffer size calculation, and to skip the extra trailing space.

Fortunately, it is only a logging issue, and not as serious as it seemed at first.

Comment 1 Steve Dickson 2012-03-19 20:12:15 UTC
commit f079113f90366f1965b9fd3b0fdbce77415f37a7
Author: Juno Krahn <Juno.Krahn>
Date:   Mon Mar 19 08:33:58 2012 -0400

    idmapd: logging of Local-Realms only lists the last realm
    
    The list of local realms can be logged with a massage like the following:
       rpc.idmapd: libnfsidmap: Realms list: 'EXAMPLE2.COM'
    Instead of printing a list of realms, only the last realm in the list is shown.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=804152
    
    Signed-off-by: Steve Dickson <steved>

Comment 2 RHEL Program Management 2012-09-07 05:08:18 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 10 errata-xmlrpc 2013-02-21 10:55:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0467.html