]> git.ipfire.org Git - thirdparty/lxc.git/commit
apparmor: don't try to mmap empty files 4284/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 27 Feb 2023 10:02:43 +0000 (11:02 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 27 Feb 2023 10:08:46 +0000 (11:08 +0100)
commitdb3cbfa75c5e54c540e13654f43723462f7d7912
tree428c6adf0ff1056d117b889ee89388f588593ca3
parent0b286bde88a2d35f0791aab82cb9b744883fe719
apparmor: don't try to mmap empty files

In case empty profile files linger somehow (eg. powerloss or
oom killer etc. between creating and writing the file) we
tried to use mmap() with a length of 0 which is invalid.
Let's treat this as if it did not exist.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/lsm/apparmor.c