summaryrefslogtreecommitdiff
path: root/sysutils/lsof/patches/patch-aa
blob: 2b5ebec017d72a331354063cf00f8fe4bc66550f (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
$NetBSD: patch-aa,v 1.23 2003/11/22 23:30:03 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.

--- dialects/n+obsd/machine.h.orig	Tue Dec  3 13:23:54 2002
+++ dialects/n+obsd/machine.h
@@ -371,7 +371,9 @@
  * (the one that its user logged on with) of the lsof process.
  */
 
-/* #define	HASSECURITY	1 */
+#if LSOF_MORE_SECURE
+#define	HASSECURITY	1
+#endif
 
 
 /*
@@ -380,7 +382,9 @@
  * listing is selected by the "-i" option.
  */
 
-/* #define	HASNOSOCKSECURITY	1	*/
+#if LSOF_LESS_SECURE_SOCKETS
+#define	HASNOSOCKSECURITY	1
+#endif
 
 
 /*