blob: 1e39b664512d43dd90cd76c48b70bfa0f29636e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// SPDX-License-Identifier: GPL-2.0
/*
* Minimal helper for Landlock selftests. Opens its own working directory
* before exiting, which may trigger access denials depending on the sandbox
* configuration.
*/
#include <fcntl.h>
#include <unistd.h>
int main(void)
{
close(open(".", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
return 0;
}
|