[Git][NTPsec/ntpsec][master] Address GitLab issue #70: waf should die if it can't find sys/capability.h...
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Jul 9 12:01:08 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
c6367352 by Eric S. Raymond at 2016-07-09T07:56:19-04:00
Address GitLab issue #70: waf should die if it can't find sys/capability.h...
...on Linux. For security's sake, make kibcap required on Linux so droproot
will always be available.
- - - - -
2 changed files:
- INSTALL
- pylib/check_cap.py
Changes:
=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -30,7 +30,7 @@ libevent 2.x::
# ln -s /usr/pkg/lib/libevent_core-2.0.so.5
libcap::
- Optional, required for -u user:group on Linux
+ Required on Linux, to support dropping root.
Fedora: libcap and libcap-devel
Debian: libcap2 and libcap-dev
=====================================
pylib/check_cap.py
=====================================
--- a/pylib/check_cap.py
+++ b/pylib/check_cap.py
@@ -1,4 +1,5 @@
from tool import check_sanity
+import sys
PCAP_FRAG = """
# include <sys/capability.h>
@@ -30,11 +31,11 @@ def check_cap_run(ctx):
ctx.check_cc(
fragment = PCAP_FRAG,
- define_name = "HAVE_CAPABILITY",
+ define_name = "HAVE_CAPABILITY",
features = "c",
- use = "CAP",
- msg = "Checking if libcap works",
- mandatory = False,
+ use = "CAP",
+ msg = "Checking if libcap works",
+ mandatory = sys.platform.startswith("linux"),
comment = "Capability support"
)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c636735228e68bbd90eef8b74a20d76fee6ffed6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160709/6dda9868/attachment.html>
More information about the vc
mailing list