Package: nscd
Version: 2.1.3-6
Severity: normal

Hello,

There are two small bugs in nscd preventing it to switch back to uid=root
when running in secure mode. Patch follows.

Gabor Gombas

==============================================================================
--- glibc-2.1.3/nscd/hstcache.c.orig    Thu Mar  9 22:08:07 2000
+++ glibc-2.1.3/nscd/hstcache.c Thu Mar  9 22:08:33 2000
@@ -318,7 +318,7 @@
     }
 
   if (secure[hstdb])
-    seteuid (uid);
+    seteuid (oldeuid);
 
   cache_addhst (db, fd, req, key, hst, uid);
 }
--- glibc-2.1.3/nscd/pwdcache.c.orig    Thu Mar  9 22:06:36 2000
+++ glibc-2.1.3/nscd/pwdcache.c Thu Mar  9 22:07:06 2000
@@ -224,7 +224,7 @@
     }
 
   if (secure[pwddb])
-    seteuid (c_uid);
+    seteuid (oldeuid);
 
   cache_addpw (db, fd, req, key, pwd, c_uid);
 }
==============================================================================

-- System Information
Debian Release: 2.2
Kernel Version: Linux babel 2.2.13 #1 SMP Tue Dec 28 21:50:02 CET 1999 i686 
unknown

Versions of the packages nscd depends on:
ii  libc6          2.1.3-6        GNU C Library: Shared libraries and Timezone

--- Begin /etc/init.d/nscd (modified conffile)
#!/bin/sh
#
#
[ -f /etc/nscd.conf ] || exit 0
[ -x /usr/sbin/nscd ] || exit 0
case $(uname -r) in
    2.[2-9].*)
        # this is okay
    ;;
    [3-9]*)
        # these are of course also okay
    ;;
    *)
        #this is not
        exit 0
    ;;
esac
RETVAL=0
case "$1" in
    start)
        secure="-S passwd,yes -S group,yes"
        echo -n "Starting Name Service Cache Daemon: "
        echo "nscd."
        start-stop-daemon --start --quiet --exec /usr/sbin/nscd -- $secure
        RETVAL=$?
        ;;
    stop)
        echo -n "Stopping Name Service Cache Daemon: "
        echo nscd.
        /usr/sbin/nscd -K
        RETVAL=$?
        ;;
    reload)
        echo "Reloading Name Service Cache Daemon configuration."
        start-stop-daemon --stop --signal 1 --quiet --oknodo --exec 
/usr/sbin/nscd
        RETVAL=$?
        ;;
    force-reload)
        $0 stop
        $0 start
        ;;
    restart)
        $0 force-reload
        ;;
    *)
        echo "Usage: /etc/init.d/nscd {start|stop|reload|force-reload|restart}"
        ;;
esac
exit $RETVAL

--- End /etc/init.d/nscd

Reply via email to