Bug ID 1131750
Summary statx is not allowed inside docker
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.0
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Virtualization:Other
Assignee virt-bugs@suse.de
Reporter matwey.kornilov@gmail.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

Hello,

I am running openSUSE Leap 15.0

kernel 4.12.14-lp150.12.48-default
docker-18.09.1_ce-lp150.5.13.1.x86_64


When I run docker as the following:

# docker run -it --rm opensuse/tumbleweed

Install gcc, compile and run the following snipped:

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main(int argc, char** argv) {
        if (argc < 2) return 1;

        const char* filepath = argv[1];

        struct statx sx;
        int ret = statx(AT_FDCWD, filepath, 0, STATX_ALL, &sx);

        printf("statx = %d\n", ret);

        return 0;
}

I see "statx = -1"

When I run docker as the following:

docker run --security-opt seccomp=unconfined -it --rm opensuse/tumbleweed

And do the same, I see completely different behavior: "statx = 0"


You are receiving this mail because: