summaryrefslogtreecommitdiff
path: root/pkg/rootless
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-05 17:27:41 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-05 17:27:43 +0100
commitca5114faf9286ce15d168f3ffd6864df820c0121 (patch)
tree76454193a81c03f3b93ff04ab565ccb5ca0cf810 /pkg/rootless
parent4b80517b6a638ff06f8ad432f0f0f5839283d058 (diff)
downloadpodman-ca5114faf9286ce15d168f3ffd6864df820c0121.tar.gz
podman-ca5114faf9286ce15d168f3ffd6864df820c0121.tar.bz2
podman-ca5114faf9286ce15d168f3ffd6864df820c0121.zip
rootless: fix clone syscall on s390 and cris archs
from the clone man page: On the cris and s390 architectures, the order of the first two arguments is reversed: long clone(void *child_stack, unsigned long flags, int *ptid, int *ctid, unsigned long newtls); Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1672714 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/rootless')
-rw-r--r--pkg/rootless/rootless_linux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index dfbc7fe33..41acd3475 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -32,7 +32,11 @@ syscall_setresgid (gid_t rgid, gid_t egid, gid_t sgid)
static int
syscall_clone (unsigned long flags, void *child_stack)
{
+#if defined(__s390__) || defined(__CRIS__)
+ return (int) syscall (__NR_clone, child_stack, flags);
+#else
return (int) syscall (__NR_clone, flags, child_stack);
+#endif
}
static char **