summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-04-30 14:37:23 +0000
committeragc <agc@pkgsrc.org>2001-04-30 14:37:23 +0000
commit5687d4b75cf4a403b2eeeeffcfb65e61dfb74b20 (patch)
tree3783bdaadfa9a3cddd031d96ba32c95f13d6e53d /sysutils
parent14eba2553c7799cbff534e516f77deedae964352 (diff)
downloadpkgsrc-5687d4b75cf4a403b2eeeeffcfb65e61dfb74b20.tar.gz
Add a mk.conf variable LSOF_MORE_SECURE, which, if set to 1, will
mean that non-privileged users can only view their own open files. Fixes PR 12741, from Anne Bennett (anne@alcor.concordia.ca)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/lsof/Makefile5
-rw-r--r--sysutils/lsof/distinfo3
-rw-r--r--sysutils/lsof/patches/patch-aa18
3 files changed, 24 insertions, 2 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile
index 69f26bff05f..32350fd7839 100644
--- a/sysutils/lsof/Makefile
+++ b/sysutils/lsof/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2001/03/07 16:07:31 agc Exp $
+# $NetBSD: Makefile,v 1.40 2001/04/30 14:37:23 agc Exp $
# FreeBSD Id: Makefile,v 1.19 1998/03/08 06:44:48 obrien Exp
#
@@ -21,6 +21,7 @@ HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS= -n ${LOWER_OPSYS}
CONFIGURE_ENV+= LSOF_CC="${CC} ${CFLAGS}"
+MAKE_ENV+= CPPFLAGS="${CPPFLAGS} -DLSOF_MORE_SECURE=${LSOF_MORE_SECURE}"
SRCBALL_NAME= ${DISTNAME:S/_W$//}
@@ -32,6 +33,8 @@ REAL_GROUP= -g kmem
MAKE_ENV+= CPPFLAGS=
.endif
+LSOF_MORE_SECURE?= 0
+
post-extract:
@(cd ${WRKDIR} ; \
EXPMD5=`${GREP} MD5 README.${SRCBALL_NAME} | ${SED} 's/^[ ]*//'` ; \
diff --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo
index 12b62512b7e..7503b701927 100644
--- a/sysutils/lsof/distinfo
+++ b/sysutils/lsof/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.2 2001/04/19 11:29:05 agc Exp $
+$NetBSD: distinfo,v 1.3 2001/04/30 14:37:24 agc Exp $
SHA1 (lsof_4.55_W.tar.gz) = b08f8c563c76d59a346e2ba9e778b327c6f087bb
Size (lsof_4.55_W.tar.gz) = 824158 bytes
+SHA1 (patch-aa) = 1946122860ad68f1c5e07f6ae82a147eb51e01c5
diff --git a/sysutils/lsof/patches/patch-aa b/sysutils/lsof/patches/patch-aa
new file mode 100644
index 00000000000..b316c5cf03b
--- /dev/null
+++ b/sysutils/lsof/patches/patch-aa
@@ -0,0 +1,18 @@
+$NetBSD: patch-aa,v 1.17 2001/04/30 14:37:24 agc Exp $
+
+If LSOF_MORE_SECURE is non-zero, compile lsof with security, and
+only let unprivileged (non-root) users view their own open files
+
+--- dialects/n+obsd/machine.h 2001/04/30 09:23:38 1.1
++++ dialects/n+obsd/machine.h 2001/04/30 10:06:24
+@@ -373,7 +373,9 @@
+ * (the one that its user logged on with) of the lsof process.
+ */
+
+-/* #define HASSECURITY 1 */
++#if LSOF_MORE_SECURE
++#define HASSECURITY 1
++#endif
+
+
+ /*