Bug 172836

Summary: nl_langinfo() doesn't resolve strings correctly->nscd doesn't show configuration...
Product: Red Hat Enterprise Linux 4 Reporter: Daniel J Blueman <daniel>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.4-2.13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-10 13:27:38 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 Daniel J Blueman 2005-11-10 13:13:11 UTC
Description of problem:
In NSCD, the configuration displayed with 'nscd --statistic' doesn't show the
yes/no configuration settings.

The code in nscd_stat.c does (eg):

 const char *yesstr = nl_langinfo (YESSTR);
  const char *nostr = nl_langinfo (NOSTR);

...

printf (_("%15d  current number of threads\n"
            "%15d  maximum number of threads\n"
            "%15lu  number of times clients had to wait\n"
            "%15s  paranoia mode enabled\n"
            "%15lu  restart internal\n"),
          nthreads, max_nthreads, data.client_queued,
          paranoia ? yesstr : nostr, (unsigned long int) restart_interval);

The '%15s paranoia' should give (eg) 'yes paranoia', but shows '   paranoia'.


Version-Release number of selected component (if applicable):
# rpm -qf `which nscd`
nscd-2.3.4-2

How reproducible:
always

Steps to Reproduce:
1. deploy RHEL4
2. nscd --statistic
3. check for yes/no fields in 'persistent' etc lines
  
Actual results:

# nscd --statistic
nscd configuration:

              0  server debug level
         4m  7s  server runtime
             -1  current number of threads
             32  maximum number of threads
              0  number of times clients had to wait
                 paranoia mode enabled
           3600  restart internal

passwd cache:

                 cache is enabled
                 cache is persistent
                 cache is shared
[snip]

Expected results:

# nscd --statistic
nscd configuration:

              0  server debug level
         4m  7s  server runtime
             -1  current number of threads
             32  maximum number of threads
              0  number of times clients had to wait
                 paranoia mode enabled
           3600  restart internal

passwd cache:

             yes cache is enabled
             yes cache is persistent
             yes cache is shared
[snip]

Additional info:

# locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

# cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SUPPORTED="en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"

Comment 1 Jakub Jelinek 2005-11-10 13:27:38 UTC
But nscd-2.3.4-2 is not the latest RHEL4 nscd update.  nscd-2.3.4-2.13 is.
It has been fixed since nscd-2.3.4-2.11.