summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-14 22:56:03 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-14 22:56:03 +0000
commita638744f37109d2dbd812285347a40cecfb11282 (patch)
treebf28cdaadce5e33a9c27377dcd0e42c7e07e9613 /sys-libs
parentsee changelog. updating grsec, inotify, genpatches.base (diff)
downloadgentoo-2-a638744f37109d2dbd812285347a40cecfb11282.tar.gz
gentoo-2-a638744f37109d2dbd812285347a40cecfb11282.tar.bz2
gentoo-2-a638744f37109d2dbd812285347a40cecfb11282.zip
Add a permission check to nscd init.d #96108 by Paul Ortyl.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/ChangeLog5
-rwxr-xr-xsys-libs/glibc/files/nscd20
2 files changed, 21 insertions, 4 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index 2c8e94910e66..f8966bd5d3a9 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-libs/glibc
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.349 2005/06/11 04:37:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.350 2005/06/14 22:56:03 vapier Exp $
+
+ 14 Jun 2005; Mike Frysinger <vapier@gentoo.org> files/nscd:
+ Add a permission check to nscd init.d #96108 by Paul Ortyl.
11 Jun 2005; Mike Frysinger <vapier@gentoo.org>
glibc-2.3.4.20041102.ebuild, glibc-2.3.4.20041102-r1.ebuild,
diff --git a/sys-libs/glibc/files/nscd b/sys-libs/glibc/files/nscd
index bdc0e254b057..75d430efe345 100755
--- a/sys-libs/glibc/files/nscd
+++ b/sys-libs/glibc/files/nscd
@@ -1,11 +1,25 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nscd,v 1.3 2004/09/29 05:24:47 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nscd,v 1.4 2005/06/14 22:56:03 vapier Exp $
+
+checkconfig() {
+ if [[ -z ${NSCD_PERMS_OK} && $(stat -c %a /var/run/nscd) != "755" ]] ; then
+ echo ""
+ ewarn "nscd run dir is not world readable, you should reset the perms:"
+ ewarn "chmod 755 /var/run/nscd"
+ ewarn "chmod a+rw /var/run/nscd/socket"
+ echo ""
+ ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
+ echo ""
+ fi
+}
start() {
+ checkconfig
+
ebegin "Starting Name Service Cache Daemon"
- secure=`while read curline ; do
+ local secure=`while read curline ; do
table=${curline%:*}
entries=${curline##$table:}
table=${table%%[^a-z]*}