void-packages/srcpkgs/criu/patches/capsetget.patch
2016-06-15 14:40:50 +02:00

27 lines
775 B
Diff

--- criu/namespaces.c.orig 2016-06-15 14:28:33.646020571 +0200
+++ criu/namespaces.c 2016-06-15 14:28:43.407021019 +0200
@@ -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>
@@ -701,13 +701,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");
return -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");
return -1;
}