2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +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:
Adrian Reber
2019-05-04 15:27:32 +02:00
committed by Andrei Vagin
parent 6e36fb26b2
commit 05b98e74e4

View File

@@ -175,7 +175,7 @@ int dump_xattr_security_selinux(int fd, FdinfoEntry *e)
/* Get the size of the xattr. */
len = fgetxattr(fd, "security.selinux", ctx, 0);
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;
}