debian/0000775000000000000000000000000012302747031007167 5ustar debian/unscd.init0000664000000000000000000000711612231337716011203 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: unscd # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts the Micro Name Service Cache Daemon # Description: This is a daemon which handles passwd and group lookups # for running programs and caches the results for the next # query. You should start this daemon only if you use # slow Services like NIS or NIS+ ### END INIT INFO # NB: Because insserv is slightly broken (#606593), we cannot provide # nscd, as this would break installs which hadn't already purged nscd. # However, if you have init scripts which depend on nscd, feel free to # change Provides: unscd to Provides: unscd nscd after purging nscd. # # unscd: Starts the Micro Name Service Cache Daemon # # description: This is a daemon which handles passwd and group lookups # for running programs and caches the results for the next # query. You should start this daemon only if you use # slow Services like NIS or NIS+ # Sanity checks. NAME="unscd" DESC="Micro Name Service Cache Daemon" DAEMON="/usr/sbin/nscd" PIDFILE="/var/run/nscd/nscd.pid" # Sanity checks. umask 022 [ -f /etc/nscd.conf ] || exit 0 [ -x "$DAEMON" ] || exit 0 [ -d /var/run/nscd ] || mkdir -p /var/run/nscd . /lib/lsb/init-functions start_unscd() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null || return 1 start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" || return 2 } stop_unscd() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # we try to stop using unscd --shutdown, that fails also if unscd is not present. # in that case, fallback to "good old methods" RETVAL=0 if ! $DAEMON --shutdown; then start-stop-daemon --stop --quiet --pidfile "$PIDFILE" --name "$NAME" --test > /dev/null RETVAL="$?" [ "$?" -ne 0 -a "$?" -ne 1 ] && return 2 fi # Wait for children to finish too start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec "$DAEMON" > /dev/null [ "$?" -ne 0 -a "$?" -ne 1 ] && return 2 rm -f "$PIDFILE" return "$RETVAL" } status() { # Return # 0 if daemon is stopped # 1 if daemon is running start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null || return 1 return 0 } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" start_unscd case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_warning_msg " (already running)." ; exit 0 ;; *) log_end_msg 1 ; exit 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" stop_unscd case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_warning_msg " (not running)." ; exit 0 ;; *) log_end_msg 1 ; exit 1 ;; esac ;; restart|force-reload|reload) log_daemon_msg "Restarting $DESC" "$NAME" stop_unscd $DAEMON --invalidate passwd --invalidate group --invalidate hosts case "$?" in 0|1) start_unscd case "$?" in 0) log_end_msg 0 ; exit 0 ;; 1) log_failure_msg " (failed -- old process is still running)." ; exit 1 ;; *) log_failure_msg " (failed to start)." ; exit 1 ;; esac ;; *) log_failure_msg " (failed to stop)." exit 1 ;; esac ;; status) log_daemon_msg "Status of $DESC service: " status case "$?" in 0) log_failure_msg "not running." ; exit 1 ;; 1) log_success_msg "running." ; exit 0 ;; esac ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}" >&2 exit 1 ;; esac debian/copyright0000664000000000000000000000055712231322160011122 0ustar Authors: Denys Vlasenko Webpage: http://busybox.net/~vda/unscd/ Download: http://busybox.net/~vda/unscd/ Debianized: Don Armstrong Tuesday, January 27, 2009 16:58:55 PST Copyright: Copyright (C) 2007 Denys Vlasenko. Licensed under the GPL version 2. License: GPL version 2, available at /usr/share/common-licenses/GPL-2 debian/source/0000775000000000000000000000000012231322160010460 5ustar debian/source/format0000664000000000000000000000001412231322160011666 0ustar 3.0 (quilt) debian/changelog0000664000000000000000000000367412302747031011053 0ustar unscd (0.51-1build2) trusty; urgency=medium * No-change rebuild against eglibc 2.19. -- Adam Conrad Mon, 24 Feb 2014 15:54:46 -0700 unscd (0.51-1build1) trusty; urgency=medium * Rebuild against eglibc 2.18. -- Colin Watson Mon, 03 Feb 2014 13:06:26 +0000 unscd (0.51-1) unstable; urgency=low * New upstream release * Silence the cache invalidation output (Closes: #622230) * Update to debhelper 9 * Support at least INT_MAX numbers in config (Closes: #676689) * Use saner settings in nscd.conf; thanks to Harald Dunkel (Closes: #702211). * Run unscd as the unscd user instead of root by default -- Don Armstrong Mon, 21 Oct 2013 17:02:22 -0700 unscd (0.49-1) unstable; urgency=low * New upstream release -- Don Armstrong Tue, 07 May 2013 11:54:45 -0700 unscd (0.48-2) unstable; urgency=low * Actually distribute the nscd binary and configuration file (Closes: #657721) and locate a brown paper bag. -- Don Armstrong Sat, 28 Jan 2012 09:27:24 -0800 unscd (0.48-1) unstable; urgency=low * New upstream release * Fix typo in nscd.conf (Closes: #656615) * Add newline to nscd.conf (Closes: #656603) * Switch to dh7 style rules file * Update standards version; no changes -- Don Armstrong Sat, 21 Jan 2012 13:36:59 -0800 unscd (0.47-3) unstable; urgency=low * Only indicate that the cache is being invalidated when in debug mode (Closes: #622230) -- Don Armstrong Mon, 30 May 2011 08:56:33 -0700 unscd (0.47-2) unstable; urgency=low * Remove the Provides: nscd as a workaround for (Closes: #606588) to avoid issues due to #606593 in insserv. -- Don Armstrong Sun, 12 Dec 2010 20:32:11 -0800 unscd (0.47-1) unstable; urgency=low * Initial packaging for Debian (Closes: #513305) -- Don Armstrong Tue, 19 Oct 2010 22:21:13 -0700 debian/compat0000664000000000000000000000000212231326655010373 0ustar 9 debian/nscd.80000664000000000000000000000136312231322160010203 0ustar .TH NSCD "8" "October 2010" "unscd - nscd which does not hang" "User Commands" .SH NAME unscd \- nscd which does not hang .SH SYNOPSIS .B nscd [\fIOPTION\fR...] .SH DESCRIPTION Name Service Cache Daemon .TP \fB\-d\fR,\-\-debug Do not daemonize; log to stderr .HP \fB\-f\fR,\-\-config\-file File to read configuration from .TP \fB\-i\fR,\-\-invalidate Invalidate cache .TP \fB\-K\fR,\-\-shutdown Shut the server down .TP \fB\-t\fR,\-\-nthreads Serve N requests in parallel .TP \fB\-V\fR,\-\-version Version .SH FILES .B /etc/nscd.conf .SH AUTHOR unscd is written by Denys Vlasenko and is licensed under the GPL version 2. .TP This manpage was written by Don Armstrong with help from help2man and is licensed under the same terms as unscd. debian/rules0000775000000000000000000000051512231340477010254 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_clean: rm -f nscd dh_auto_clean override_dh_auto_build: gcc $(CFLAGS) $(LDFLAGS) -o nscd nscd.c override_dh_auto_install: install -d debian/unscd/usr/sbin/ install -t debian/unscd/usr/sbin/ nscd install -d debian/unscd/etc/ install -m644 -t debian/unscd/etc/ debian/nscd.conf debian/control0000664000000000000000000000207712231326655010606 0ustar Source: unscd Section: admin Priority: extra Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), groff-base Maintainer: Don Armstrong Vcs-Browser: http://git.donarmstrong.com/unscd.git Vcs-Git: git://git.donarmstrong.com/unscd.git Package: unscd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: nscd Replaces: nscd Provides: nscd Homepage: http://busybox.net/~vda/unscd/ Description: Micro Name Service Caching Daemon A daemon which handles passwd, group and host lookups for running programs and caches the results for the next query. You only need this package if you are using slow Name Services like LDAP, NIS or NIS+. . This particular NSCD is a complete rewrite of the GNU glibc nscd which is a single threaded server process which offloads all NSS lookups to worker children; cache hits are handled by the parent, and only cache misses start worker children, making the parent immune to resource leaks, hangs, and crashes in NSS libraries. . It should mostly be a drop-in replacement for existing installs using nscd. debian/nscd.conf0000664000000000000000000000416112231337152010767 0ustar # This file is currently taken verbatim from the version distributed # with GNU glibc's nscd with unused configurations removed # # /etc/nscd.conf # # An example Name Service Cache config file. This file is needed by nscd. # # Legal entries are: # # logfile # debug-level # threads # max-threads # server-user # server-user is ignored if nscd is started with -S parameters # stat-user (ignored; any user can stat) # reload-count (ignored; unscd should never crash) # paranoia (ignored) # restart-interval (ignored; unscd should never crash) # # enable-cache # positive-time-to-live