View | Details | Raw Unified | Return to bug 233026 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	procenv
4
PORTNAME=	procenv
5
PORTVERSION=	0.36
5
PORTVERSION=	0.40
6
PORTREVISION=	1
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	https://launchpad.net/procenv/trunk/${PORTVERSION}/+download/ \
7
MASTER_SITES=	https://launchpad.net/procenv/trunk/${PORTVERSION}/+download/ \
9
		http://people.canonical.com/~jhunt/debian/procenv/${PORTVERSION}/ \
8
		http://people.canonical.com/~jhunt/debian/procenv/${PORTVERSION}/ \
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (procenv-0.36.tar.gz) = 70550499d0602ffbb4bbbe91c1a6d468d44589ab29b74b5ccc42b9558f970fb4
1
TIMESTAMP = 1541550579
2
SIZE (procenv-0.36.tar.gz) = 264248
2
SHA256 (procenv-0.40.tar.gz) = 2534533e5199539165d622b51e5ce3b354244c7a7590b1f6ececd5f2d09e4e4c
3
SIZE (procenv-0.40.tar.gz) = 272028
(-)files/patch-configure (+19 lines)
Line 0 Link Here
1
--- configure.orig	2018-11-07 00:31:21 UTC
2
+++ configure
3
@@ -4924,12 +4924,12 @@ if test "$ac_res" != no; then :
4
 
5
 fi
6
 
7
-for ac_header in sys/capability.h
8
+for ac_header in sys/capsicum.h
9
 do :
10
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
11
-if test "x$ac_cv_header_sys_capability_h" = xyes; then :
12
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
13
+if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
14
   cat >>confdefs.h <<_ACEOF
15
-#define HAVE_SYS_CAPABILITY_H 1
16
+#define HAVE_SYS_CAPSICUM_H 1
17
 _ACEOF
18
 
19
 fi
(-)files/patch-configure.ac (+11 lines)
Line 0 Link Here
1
--- configure.ac.orig	2018-11-07 00:31:29 UTC
2
+++ configure.ac
3
@@ -45,7 +45,7 @@ AC_CHECK_HEADERS([numa.h])
4
 # FreeBSD 9+ with appropriately configured kernel
5
 # (enabled by default in FreeBSD 10)
6
 AC_SEARCH_LIBS([cap_getmode], [c])
7
-AC_CHECK_HEADERS([sys/capability.h])
8
+AC_CHECK_HEADERS([sys/capsicum.h])
9
 
10
 AC_SEARCH_LIBS([cap_init], [cap])
11
 
(-)files/patch-src_procenv.c (-3 / +86 lines)
Lines 1-6 Link Here
1
--- src/procenv.c.orig	2014-08-16 19:06:54 UTC
1
--- src/procenv.c.orig	2018-11-07 00:43:59 UTC
2
+++ src/procenv.c
2
+++ src/procenv.c
3
@@ -5361,8 +5361,13 @@ show_capabilities_bsd (int fd)
3
@@ -3249,7 +3249,7 @@ show_fds_generic (void)
4
 		entry ("device", "%s", name ? name : NA_STR);
5
 
6
 		section_open ("capabilities");
7
-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H)
8
+#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H)
9
 		show_capabilities_bsd (fd);
10
 #endif
11
 		section_close ();
12
@@ -5377,7 +5377,7 @@ show_mounts_bsd (ShowMountType what)
13
 
14
 #endif
15
 
16
-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H)
17
+#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H)
18
 void
19
 show_capabilities_bsd (int fd)
20
 {
21
@@ -5453,8 +5453,13 @@ show_capabilities_bsd (int fd)
4
 	show_capsicum_cap (rights, CAP_KQUEUE);
22
 	show_capsicum_cap (rights, CAP_KQUEUE);
5
 	show_capsicum_cap (rights, CAP_KQUEUE_CHANGE);
23
 	show_capsicum_cap (rights, CAP_KQUEUE_CHANGE);
6
 	show_capsicum_cap (rights, CAP_KQUEUE_EVENT);
24
 	show_capsicum_cap (rights, CAP_KQUEUE_EVENT);
Lines 14-20 Link Here
14
 	show_capsicum_cap (rights, CAP_LISTEN);
32
 	show_capsicum_cap (rights, CAP_LISTEN);
15
 	show_capsicum_cap (rights, CAP_LOOKUP);
33
 	show_capsicum_cap (rights, CAP_LOOKUP);
16
 	show_capsicum_cap (rights, CAP_MAC_GET);
34
 	show_capsicum_cap (rights, CAP_MAC_GET);
17
@@ -5392,8 +5397,13 @@ show_capabilities_bsd (int fd)
35
@@ -5484,8 +5489,13 @@ show_capabilities_bsd (int fd)
18
 	show_capsicum_cap (rights, CAP_READ);
36
 	show_capsicum_cap (rights, CAP_READ);
19
 #if __FreeBSD__ > 9
37
 #if __FreeBSD__ > 9
20
 	show_capsicum_cap (rights, CAP_RECV);
38
 	show_capsicum_cap (rights, CAP_RECV);
Lines 28-30 Link Here
28
 	show_capsicum_cap (rights, CAP_SEEK);
46
 	show_capsicum_cap (rights, CAP_SEEK);
29
 #if __FreeBSD__ > 9
47
 #if __FreeBSD__ > 9
30
 	show_capsicum_cap (rights, CAP_SEEK_TELL);
48
 	show_capsicum_cap (rights, CAP_SEEK_TELL);
49
@@ -5513,7 +5523,7 @@ out:
50
 	/* clang requires this */
51
 	return;
52
 }
53
-#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) */
54
+#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) */
55
 
56
 void
57
 get_priorities (void)
58
@@ -7311,7 +7321,7 @@ show_capabilities (void)
59
 
60
 #if defined (PROCENV_LINUX)
61
 
62
-#if defined (HAVE_SYS_CAPABILITY_H)
63
+#if defined (HAVE_SYS_CAPSICUM_H)
64
 int
65
 get_capability_by_flag_type (cap_t cap_p, cap_flag_t type, cap_value_t cap)
66
 {
67
@@ -7324,12 +7334,12 @@ get_capability_by_flag_type (cap_t cap_p
68
 
69
     return ret < 0 ? ret : result;
70
 }
71
-#endif /* HAVE_SYS_CAPABILITY_H */
72
+#endif /* HAVE_SYS_CAPSICUM_H */
73
 
74
 void
75
 show_capabilities_linux (void)
76
 {
77
-#if defined (HAVE_SYS_CAPABILITY_H)
78
+#if defined (HAVE_SYS_CAPSICUM_H)
79
 	int    last_known;
80
 	cap_t  caps;
81
 
82
@@ -7341,7 +7351,7 @@ show_capabilities_linux (void)
83
 
84
 	header ("capabilities");
85
 
86
-#if defined (HAVE_SYS_CAPABILITY_H)
87
+#if defined (HAVE_SYS_CAPSICUM_H)
88
 	caps = cap_get_proc ();
89
 
90
 	entry ("count (CAP_LAST_CAP+1)", "%d", CAP_LAST_CAP+1);
91
@@ -7495,11 +7505,11 @@ show_capabilities_linux (void)
92
 #endif
93
 
94
 out:
95
-#endif /* HAVE_SYS_CAPABILITY_H */
96
+#endif /* HAVE_SYS_CAPSICUM_H */
97
 	footer ();
98
 }
99
 
100
-#if defined (HAVE_SYS_CAPABILITY_H)
101
+#if defined (HAVE_SYS_CAPSICUM_H)
102
 #ifdef PROCENV_NEED_LOCAL_CAP_GET_BOUND
103
 
104
 int cap_get_bound (cap_value_t cap)
105
@@ -7512,7 +7522,7 @@ int cap_get_bound (cap_value_t cap)
106
 }
107
 
108
 #endif /* PROCENV_NEED_LOCAL_CAP_GET_BOUND */
109
-#endif /* HAVE_SYS_CAPABILITY_H */
110
+#endif /* HAVE_SYS_CAPSICUM_H */
111
 
112
 void
113
 show_timezone_linux (void)
(-)files/patch-src_procenv.h (+71 lines)
Line 0 Link Here
1
--- src/procenv.h.orig	2018-11-07 00:30:51 UTC
2
+++ src/procenv.h
3
@@ -215,7 +215,7 @@ size_t split_fields (const char *string,
4
 #include <linux/securebits.h>
5
 #endif
6
 
7
-#include <linux/capability.h>
8
+#include <linux/capsicum.h>
9
 #include <linux/vt.h>
10
 
11
 #if defined (HAVE_SYS_APPARMOR_H)
12
@@ -355,8 +355,8 @@ size_t split_fields (const char *string,
13
 #define PROCENV_CPU_SET_TYPE cpuset_t
14
 #include <pthread_np.h>
15
 
16
-#if defined (HAVE_SYS_CAPABILITY_H)
17
-#include <sys/capability.h>
18
+#if defined (HAVE_SYS_CAPSICUM_H)
19
+#include <sys/capsicum.h>
20
 
21
 #if defined (PROCENV_BSD) && __FreeBSD__ == 9
22
 /* FreeBSD 9 introduced optional capabilities. FreeBSD enabled them by
23
@@ -369,12 +369,12 @@ size_t split_fields (const char *string,
24
 
25
 #define show_capsicum_cap(rights, cap) \
26
 	entry (#cap, "%s", cap_rights_is_set ((&rights), cap) ? YES_STR : NO_STR)
27
-#endif /* HAVE_SYS_CAPABILITY_H */
28
+#endif /* HAVE_SYS_CAPSICUM_H */
29
 
30
 #elif defined (PROCENV_LINUX) || defined (PROCENV_GNU_BSD) || defined (PROCENV_HURD)
31
 
32
-#if defined (HAVE_SYS_CAPABILITY_H)
33
-#include <sys/capability.h>
34
+#if defined (HAVE_SYS_CAPSICUM_H)
35
+#include <sys/capsicum.h>
36
 #endif
37
 
38
 #if ! defined (_LINUX_CAPABILITY_VERSION_3) && ! defined (CAP_LAST_CAP)
39
@@ -387,7 +387,7 @@ size_t split_fields (const char *string,
40
 #endif /* PROCENV_LINUX || PROCENV_GNU_BSD || PROCENV_HURD */
41
 
42
 #if defined (PROCENV_LINUX)
43
-#if defined (HAVE_SYS_CAPABILITY_H)
44
+#if defined (HAVE_SYS_CAPSICUM_H)
45
 #ifndef CAP_IS_SUPPORTED
46
 int cap_get_bound (cap_value_t cap);
47
 #define CAP_IS_SUPPORTED(cap) (cap_get_bound (cap) >= 0)
48
@@ -1007,9 +1007,9 @@ void show_cgroups_linux (void);
49
 void show_oom_linux (void);
50
 void show_timezone_linux (void);
51
 
52
-#if defined (HAVE_SYS_CAPABILITY_H)
53
+#if defined (HAVE_SYS_CAPSICUM_H)
54
 int get_capability_by_flag_type (cap_t cap_p, cap_flag_t type, cap_value_t cap);
55
-#endif /* HAVE_SYS_CAPABILITY_H */
56
+#endif /* HAVE_SYS_CAPSICUM_H */
57
 
58
 void show_capabilities_linux (void);
59
 void show_security_module_linux (void);
60
@@ -1064,9 +1064,9 @@ void show_proc_branch_bsd (void);
61
 void show_cpu_bsd (void);
62
 #endif /* PROCENV_BSD + PROCENV_GNU_BSD */
63
 
64
-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H)
65
+#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H)
66
 void show_capabilities_bsd (int fd);
67
-#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) */
68
+#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) */
69
 
70
 #if defined (PROCENV_LINUX) || defined (PROCENV_HURD)
71
 /* semctl(2) on Linux tells us _we_ must define this */

Return to bug 233026