mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
lsm: fix compiler error on Fedora 30
This fixes following compiler error: criu/lsm.c: In function ‘dump_xattr_security_selinux’: criu/include/log.h:51:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 51 | print_on_level(LOG_ERROR, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 52 | "Error (%s:%d): " LOG_PREFIX fmt, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 | __FILE__, __LINE__, ##__VA_ARGS__) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/lsm.c:166:3: note: in expansion of macro ‘pr_err’ 166 | pr_err("Reading xattr %s to FD %d failed\n", ctx, fd); | ^~~~~~ Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
committed by
Andrei Vagin
parent
6e36fb26b2
commit
05b98e74e4
@@ -175,7 +175,7 @@ int dump_xattr_security_selinux(int fd, FdinfoEntry *e)
|
|||||||
/* Get the size of the xattr. */
|
/* Get the size of the xattr. */
|
||||||
len = fgetxattr(fd, "security.selinux", ctx, 0);
|
len = fgetxattr(fd, "security.selinux", ctx, 0);
|
||||||
if (len == -1) {
|
if (len == -1) {
|
||||||
pr_err("Reading xattr %s to FD %d failed\n", ctx, fd);
|
pr_err("Reading xattr security.selinux from FD %d failed\n", fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user