diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-02 19:39:55 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-02 19:50:10 +0200 |
commit | 418bc208d08dbc4a0a3511e503c946ab6ac71c39 (patch) | |
tree | aa234f9fb11930db005cd93a298646774936da58 /auto/isolation | |
parent | 2c0888f69c247c82fc02ba207aa19fa00acf4b5e (diff) | |
download | unit-418bc208d08dbc4a0a3511e503c946ab6ac71c39.tar.gz unit-418bc208d08dbc4a0a3511e503c946ab6ac71c39.tar.bz2 |
Rejecting non-Linux pivot_root(2).
Some non-Linux systems implement pivot_root(2), even if they
don't document that. An example is MacOS:
$ grepc pivot_root / 2>/dev/null
.../sys/sysproto.h:3012:
int pivot_root(struct proc *, struct pivot_root_args *, int *);
Since the prototype of the syscall differs from that of Linux, we
can't use that syscall. Let's make sure the test only detects
pivot_root(2) under Linux. Also, rename the feature macro to make
clear that it's only about Linux's pivot_root(2).
This closes #737 issue on GitHub.
Diffstat (limited to '')
-rw-r--r-- | auto/isolation | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/auto/isolation b/auto/isolation index 6debdc3b..384f7ef1 100644 --- a/auto/isolation +++ b/auto/isolation @@ -61,11 +61,14 @@ fi nxt_feature="Linux pivot_root()" -nxt_feature_name=NXT_HAVE_PIVOT_ROOT +nxt_feature_name=NXT_HAVE_LINUX_PIVOT_ROOT nxt_feature_run=no nxt_feature_incs= nxt_feature_libs= nxt_feature_test="#include <sys/syscall.h> + #if !defined(__linux__) + # error + #endif int main() { return SYS_pivot_root; |