2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

check: Implement F_GETOWNER_UIDS

It is in mainline and required for proper CRIU work.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2014-11-19 12:18:00 +04:00
committed by Pavel Emelyanov
parent 199619791d
commit 02b2f197ed

View File

@@ -217,11 +217,21 @@ static int check_prctl(void)
static int check_fcntl(void)
{
/*
* FIXME Add test for F_GETOWNER_UIDS once
* it's merged into mainline and kernel part
* settle down.
*/
u32 v[2];
int fd;
fd = open("/proc/self/comm", O_RDONLY);
if (fd < 0) {
pr_perror("Can't open self comm file");
return -1;
}
if (fcntl(fd, F_GETOWNER_UIDS, (long)v)) {
pr_perror("Can'r fetch file owner UIDs");
return -1;
}
close(fd);
return 0;
}