summaryrefslogtreecommitdiff
path: root/sysutils/lsof/patches/patch-aa
blob: b8d1eb2b209917d073efaf81c7ac7ee1a247a47b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$NetBSD: patch-aa,v 1.24 2004/11/28 22:39:07 atatat Exp $

If LSOF_MORE_SECURE is non-zero, compile lsof with security, and
only let unprivileged (non-root) users view their own open files.
Set LSOF_LESS_SECURE_SOCKETS to non-zero in order to allow non-root
users to see open sockets, even when LSOF_MORE_SECURE is set.

Also, incorporate a patch from the author that widens the NETBSDV
definition to account for new current versioning system, properly
handles the sys/bufq.h mess, adds a bit more to procfs support, and
adds ptyfs support.

--- dialects/n+obsd/machine.h.orig	2004-10-17 17:55:27.000000000 -0400
+++ dialects/n+obsd/machine.h
@@ -383,7 +383,9 @@
  * (the one that its user logged on with) of the lsof process.
  */
 
-/* #define	HASSECURITY	1 */
+#if LSOF_MORE_SECURE
+#define	HASSECURITY	1
+#endif
 
 
 /*
@@ -392,7 +394,9 @@
  * listing is selected by the "-i" option.
  */
 
-/* #define	HASNOSOCKSECURITY	1	*/
+#if LSOF_LESS_SECURE_SOCKETS
+#define	HASNOSOCKSECURITY	1
+#endif
 
 
 /*
@@ -407,9 +411,9 @@
 
 #define	HASSETLOCALE	1
 
-# if	defined(NETBSDV) && NETBSDV>=1060
+# if	defined(NETBSDV) && NETBSDV>=1006000
 #define	HASWIDECHAR	1
-# endif	/* defined(NETBSDV) && NETBSDV>=1060*/
+# endif	/* defined(NETBSDV) && NETBSDV>=1006000 */
 
 /* #define	WIDECHARINCL	<wchar.h>	*/
 
@@ -529,11 +533,11 @@
 /* #define	USE_LIB_READMNT			1	   rmnt.c */
 /* #define	USE_LIB_REGEX			1	   regex.c */
 
-# if	(defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020)
+# if	(defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000)
 #define	USE_LIB_RNMH				1	/* rnmh.c */
-# else	/* (defined(OPENBSDV) && OPENBSDV<2010) && (defined(NETBSDV) && NETBSDV<1020) */
+# else	/* (defined(OPENBSDV) && OPENBSDV<2010) && (defined(NETBSDV) && NETBSDV<1002000) */
 #define	USE_LIB_RNAM				1	/* rnam.c */
-# endif	/* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
+# endif	/* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */
 
 /* #define	USE_LIB_RNCH			1	   rnch.c */
 /* #define	USE_LIB_SNPF			1	   snpf.c */