mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +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:
committed by
Pavel Emelyanov
parent
199619791d
commit
02b2f197ed
20
cr-check.c
20
cr-check.c
@@ -217,11 +217,21 @@ static int check_prctl(void)
|
|||||||
|
|
||||||
static int check_fcntl(void)
|
static int check_fcntl(void)
|
||||||
{
|
{
|
||||||
/*
|
u32 v[2];
|
||||||
* FIXME Add test for F_GETOWNER_UIDS once
|
int fd;
|
||||||
* it's merged into mainline and kernel part
|
|
||||||
* settle down.
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user