void-packages/srcpkgs/criu/patches/capsetget.patch

30 lines
828 B
Diff

Index: criu-3.17.1/criu/namespaces.c
===================================================================
--- criu-3.17.1.orig/criu/namespaces.c
+++ criu-3.17.1/criu/namespaces.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <signal.h>
#include <sched.h>
-#include <sys/capability.h>
+#include <linux/capability.h>
#include <sys/stat.h>
#include <limits.h>
#include <errno.h>
@@ -958,13 +958,13 @@ static int check_user_ns(int pid)
hdr.version = _LINUX_CAPABILITY_VERSION_3;
hdr.pid = 0;
- if (capget(&hdr, data) < 0) {
+ if (syscall(SYS_capget, &hdr, data) < 0) {
pr_perror("capget");
exit(1);
}
data[0].effective = data[0].permitted;
data[1].effective = data[1].permitted;
- if (capset(&hdr, data) < 0) {
+ if (syscall(SYS_capset, &hdr, data) < 0) {
pr_perror("capset");
exit(1);
}