<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>74395</bug_id>
          
          <creation_ts>2004-12-14 09:15 0000</creation_ts>
          <short_desc>shadow hard-codes outdated nscd socket path</short_desc>
          <delta_ts>2005-01-11 19:21:24 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo@spodhuis.org</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>gtbgs@figpost.com</cc>

      

      
          <long_desc isprivate="0">
            <who>gentoo@spodhuis.org</who>
            <bug_when>2004-12-14 09:15:17 0000</bug_when>
            <thetext>With nscd running, a user added by useradd(8) can&apos;t immediately be deleted by userdel(8).  These tools attempt to notify the nscd using the socket, but the path to the socket has been changed and the shadow tools still use the old path.

Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/nscd start
2. useradd fred
3. userdel fred

Actual Results:  
(standard prompt modified to include $?:)

0: domus root # id fred
id: fred: No such user
1: domus root # useradd fred
0: domus root # userdel fred
userdel: user fred does not exist
6: domus root # id fred
uid=1101(fred) gid=100(users) groups=100(users)


Expected Results:  
Deleted user.

Shutting down nscd allows the user to be deleted.
strace(1) shows that usermod is attempting to talk to nscd via:
 /var/run/.nscd_socket
whereas this should now be:
 /var/run/nscd/socket

Inside the sys-apps/shadow source, lib/nscd.c contains a definition of
_PATH_NSCDSOCKET which can be changed to the correct path to get a working set
of tools.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gtbgs@figpost.com</who>
            <bug_when>2005-01-11 18:57:49 0000</bug_when>
            <thetext>I have a related bug to report: because nscd now expects its pidfile to be in /var/run/nscd/, if that directory doesn&apos;t exist, nscd won&apos;t start (but since the /etc/init.d/nscd script doesn&apos;t handle this case, it just fails silently, and you don&apos;t notice anything is wrong).

Recommended fix for this: create the directory if it doesn&apos;t already exist, and correct the --pid argument in stop().</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-01-11 19:21:24 0000</bug_when>
            <thetext>shadow-4.0.6-r1 fixes the location of the socket, thanks !</thetext>
          </long_desc>
      
    </bug>

</bugzilla>