summaryrefslogtreecommitdiffstats
path: root/tests/bugs/access-control/bug-1387241.c
blob: 04e0d6ea11f78d6bbd55bf449d8a256da54054c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
        int ret = EXIT_FAILURE;
        int fd = open(argv[1], O_RDONLY|O_TRUNC);

        if (fd) {
                ret = EXIT_SUCCESS;
                close(fd);
        }

        return ret;
}