Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606184 - app-misc/pax-utils: allow compilation on older inux
Summary: app-misc/pax-utils: allow compilation on older inux
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-18 10:10 UTC by Fabian Groffen
Modified: 2017-01-22 18:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2017-01-18 10:10:12 UTC
The CLONE_* symbols in security.c were introduced starting in kernel 2.6.19.  If you unfortunately happen to be on some old (chroot) environment like RH5, these symbols are missing.

Please consider the following patch to simply treat those platforms as non-linux to avoid using the symbols, but still produce a usable tool.

If ok with you, I can also (try to) push this myself to the repo.

Thanks.


diff --git a/security.c b/security.c
index 8019860..258d8f6 100644
--- a/security.c
+++ b/security.c
@@ -7,7 +7,7 @@
 
 #include "paxinc.h"
 
-#ifdef __linux__
+#if defined(__linux__) && defined(CLONE_NEWIPC)
 
 #ifdef __SANITIZE_ADDRESS__
 /* ASAN does some weird stuff. */
diff --git a/security.h b/security.h
index c93ec3e..85673ff 100644
--- a/security.h
+++ b/security.h
@@ -16,7 +16,7 @@
 # define USE_SLOW_SECURITY 0
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) && defined(CLONE_NEWIPC)
 /* Lock down the runtime; allow_forking controls whether to use a pidns. */
 void security_init(bool allow_forking);
 /* Disable forking; usable only when allow_forking above was true. */
Comment 1 SpanKY gentoo-dev 2017-01-21 17:04:50 UTC
there's a bit more to it, but i've fixed it locally now, so it'll be in the next release
Comment 2 SpanKY gentoo-dev 2017-01-22 18:00:24 UTC
should be fixed with the 1.2 release