FreeBSD Bugzilla – Attachment 199037 Details for
Bug 233026
sysutils/procenv: Fix use of deprecated #include (sys/capability.h).
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn-diff-procenv
svn-diff-procenv (text/plain), 9.24 KB, created by
Walter Schwarzenfeld
on 2018-11-07 01:05:20 UTC
(
hide
)
Description:
svn-diff-procenv
Filename:
MIME Type:
Creator:
Walter Schwarzenfeld
Created:
2018-11-07 01:05:20 UTC
Size:
9.24 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 484374) >+++ Makefile (working copy) >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= procenv >-PORTVERSION= 0.36 >-PORTREVISION= 1 >+PORTVERSION= 0.40 > CATEGORIES= sysutils > MASTER_SITES= https://launchpad.net/procenv/trunk/${PORTVERSION}/+download/ \ > http://people.canonical.com/~jhunt/debian/procenv/${PORTVERSION}/ \ >Index: distinfo >=================================================================== >--- distinfo (revision 484374) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (procenv-0.36.tar.gz) = 70550499d0602ffbb4bbbe91c1a6d468d44589ab29b74b5ccc42b9558f970fb4 >-SIZE (procenv-0.36.tar.gz) = 264248 >+TIMESTAMP = 1541550579 >+SHA256 (procenv-0.40.tar.gz) = 2534533e5199539165d622b51e5ce3b354244c7a7590b1f6ececd5f2d09e4e4c >+SIZE (procenv-0.40.tar.gz) = 272028 >Index: files/patch-configure >=================================================================== >--- files/patch-configure (nonexistent) >+++ files/patch-configure (working copy) >@@ -0,0 +1,19 @@ >+--- configure.orig 2018-11-07 00:31:21 UTC >++++ configure >+@@ -4924,12 +4924,12 @@ if test "$ac_res" != no; then : >+ >+ fi >+ >+-for ac_header in sys/capability.h >++for ac_header in sys/capsicum.h >+ do : >+- ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default" >+-if test "x$ac_cv_header_sys_capability_h" = xyes; then : >++ ac_fn_c_check_header_mongrel "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default" >++if test "x$ac_cv_header_sys_capsicum_h" = xyes; then : >+ cat >>confdefs.h <<_ACEOF >+-#define HAVE_SYS_CAPABILITY_H 1 >++#define HAVE_SYS_CAPSICUM_H 1 >+ _ACEOF >+ >+ fi > >Property changes on: files/patch-configure >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-configure.ac >=================================================================== >--- files/patch-configure.ac (nonexistent) >+++ files/patch-configure.ac (working copy) >@@ -0,0 +1,11 @@ >+--- configure.ac.orig 2018-11-07 00:31:29 UTC >++++ configure.ac >+@@ -45,7 +45,7 @@ AC_CHECK_HEADERS([numa.h]) >+ # FreeBSD 9+ with appropriately configured kernel >+ # (enabled by default in FreeBSD 10) >+ AC_SEARCH_LIBS([cap_getmode], [c]) >+-AC_CHECK_HEADERS([sys/capability.h]) >++AC_CHECK_HEADERS([sys/capsicum.h]) >+ >+ AC_SEARCH_LIBS([cap_init], [cap]) >+ > >Property changes on: files/patch-configure.ac >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_procenv.c >=================================================================== >--- files/patch-src_procenv.c (revision 484374) >+++ files/patch-src_procenv.c (working copy) >@@ -1,6 +1,24 @@ >---- src/procenv.c.orig 2014-08-16 19:06:54 UTC >+--- src/procenv.c.orig 2018-11-07 00:43:59 UTC > +++ src/procenv.c >-@@ -5361,8 +5361,13 @@ show_capabilities_bsd (int fd) >+@@ -3249,7 +3249,7 @@ show_fds_generic (void) >+ entry ("device", "%s", name ? name : NA_STR); >+ >+ section_open ("capabilities"); >+-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) >++#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) >+ show_capabilities_bsd (fd); >+ #endif >+ section_close (); >+@@ -5377,7 +5377,7 @@ show_mounts_bsd (ShowMountType what) >+ >+ #endif >+ >+-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) >++#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) >+ void >+ show_capabilities_bsd (int fd) >+ { >+@@ -5453,8 +5453,13 @@ show_capabilities_bsd (int fd) > show_capsicum_cap (rights, CAP_KQUEUE); > show_capsicum_cap (rights, CAP_KQUEUE_CHANGE); > show_capsicum_cap (rights, CAP_KQUEUE_EVENT); >@@ -14,7 +32,7 @@ > show_capsicum_cap (rights, CAP_LISTEN); > show_capsicum_cap (rights, CAP_LOOKUP); > show_capsicum_cap (rights, CAP_MAC_GET); >-@@ -5392,8 +5397,13 @@ show_capabilities_bsd (int fd) >+@@ -5484,8 +5489,13 @@ show_capabilities_bsd (int fd) > show_capsicum_cap (rights, CAP_READ); > #if __FreeBSD__ > 9 > show_capsicum_cap (rights, CAP_RECV); >@@ -28,3 +46,68 @@ > show_capsicum_cap (rights, CAP_SEEK); > #if __FreeBSD__ > 9 > show_capsicum_cap (rights, CAP_SEEK_TELL); >+@@ -5513,7 +5523,7 @@ out: >+ /* clang requires this */ >+ return; >+ } >+-#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) */ >++#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) */ >+ >+ void >+ get_priorities (void) >+@@ -7311,7 +7321,7 @@ show_capabilities (void) >+ >+ #if defined (PROCENV_LINUX) >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ int >+ get_capability_by_flag_type (cap_t cap_p, cap_flag_t type, cap_value_t cap) >+ { >+@@ -7324,12 +7334,12 @@ get_capability_by_flag_type (cap_t cap_p >+ >+ return ret < 0 ? ret : result; >+ } >+-#endif /* HAVE_SYS_CAPABILITY_H */ >++#endif /* HAVE_SYS_CAPSICUM_H */ >+ >+ void >+ show_capabilities_linux (void) >+ { >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ int last_known; >+ cap_t caps; >+ >+@@ -7341,7 +7351,7 @@ show_capabilities_linux (void) >+ >+ header ("capabilities"); >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ caps = cap_get_proc (); >+ >+ entry ("count (CAP_LAST_CAP+1)", "%d", CAP_LAST_CAP+1); >+@@ -7495,11 +7505,11 @@ show_capabilities_linux (void) >+ #endif >+ >+ out: >+-#endif /* HAVE_SYS_CAPABILITY_H */ >++#endif /* HAVE_SYS_CAPSICUM_H */ >+ footer (); >+ } >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ #ifdef PROCENV_NEED_LOCAL_CAP_GET_BOUND >+ >+ int cap_get_bound (cap_value_t cap) >+@@ -7512,7 +7522,7 @@ int cap_get_bound (cap_value_t cap) >+ } >+ >+ #endif /* PROCENV_NEED_LOCAL_CAP_GET_BOUND */ >+-#endif /* HAVE_SYS_CAPABILITY_H */ >++#endif /* HAVE_SYS_CAPSICUM_H */ >+ >+ void >+ show_timezone_linux (void) >Index: files/patch-src_procenv.h >=================================================================== >--- files/patch-src_procenv.h (nonexistent) >+++ files/patch-src_procenv.h (working copy) >@@ -0,0 +1,71 @@ >+--- src/procenv.h.orig 2018-11-07 00:30:51 UTC >++++ src/procenv.h >+@@ -215,7 +215,7 @@ size_t split_fields (const char *string, >+ #include <linux/securebits.h> >+ #endif >+ >+-#include <linux/capability.h> >++#include <linux/capsicum.h> >+ #include <linux/vt.h> >+ >+ #if defined (HAVE_SYS_APPARMOR_H) >+@@ -355,8 +355,8 @@ size_t split_fields (const char *string, >+ #define PROCENV_CPU_SET_TYPE cpuset_t >+ #include <pthread_np.h> >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >+-#include <sys/capability.h> >++#if defined (HAVE_SYS_CAPSICUM_H) >++#include <sys/capsicum.h> >+ >+ #if defined (PROCENV_BSD) && __FreeBSD__ == 9 >+ /* FreeBSD 9 introduced optional capabilities. FreeBSD enabled them by >+@@ -369,12 +369,12 @@ size_t split_fields (const char *string, >+ >+ #define show_capsicum_cap(rights, cap) \ >+ entry (#cap, "%s", cap_rights_is_set ((&rights), cap) ? YES_STR : NO_STR) >+-#endif /* HAVE_SYS_CAPABILITY_H */ >++#endif /* HAVE_SYS_CAPSICUM_H */ >+ >+ #elif defined (PROCENV_LINUX) || defined (PROCENV_GNU_BSD) || defined (PROCENV_HURD) >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >+-#include <sys/capability.h> >++#if defined (HAVE_SYS_CAPSICUM_H) >++#include <sys/capsicum.h> >+ #endif >+ >+ #if ! defined (_LINUX_CAPABILITY_VERSION_3) && ! defined (CAP_LAST_CAP) >+@@ -387,7 +387,7 @@ size_t split_fields (const char *string, >+ #endif /* PROCENV_LINUX || PROCENV_GNU_BSD || PROCENV_HURD */ >+ >+ #if defined (PROCENV_LINUX) >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ #ifndef CAP_IS_SUPPORTED >+ int cap_get_bound (cap_value_t cap); >+ #define CAP_IS_SUPPORTED(cap) (cap_get_bound (cap) >= 0) >+@@ -1007,9 +1007,9 @@ void show_cgroups_linux (void); >+ void show_oom_linux (void); >+ void show_timezone_linux (void); >+ >+-#if defined (HAVE_SYS_CAPABILITY_H) >++#if defined (HAVE_SYS_CAPSICUM_H) >+ int get_capability_by_flag_type (cap_t cap_p, cap_flag_t type, cap_value_t cap); >+-#endif /* HAVE_SYS_CAPABILITY_H */ >++#endif /* HAVE_SYS_CAPSICUM_H */ >+ >+ void show_capabilities_linux (void); >+ void show_security_module_linux (void); >+@@ -1064,9 +1064,9 @@ void show_proc_branch_bsd (void); >+ void show_cpu_bsd (void); >+ #endif /* PROCENV_BSD + PROCENV_GNU_BSD */ >+ >+-#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) >++#if defined (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) >+ void show_capabilities_bsd (int fd); >+-#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPABILITY_H) */ >++#endif /* (PROCENV_BSD) && defined (HAVE_SYS_CAPSICUM_H) */ >+ >+ #if defined (PROCENV_LINUX) || defined (PROCENV_HURD) >+ /* semctl(2) on Linux tells us _we_ must define this */ > >Property changes on: files/patch-src_procenv.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+Author Date Id Rev URL >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233026
:
199037
|
199039
|
206290