apparmor: Fix undefined references to zstd_ symbols
authorJohn Johansen <john.johansen@canonical.com>
Thu, 29 Sep 2022 13:24:29 +0000 (06:24 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 3 Oct 2022 21:49:04 +0000 (14:49 -0700)
commit70f24a9f9084b7fffd95daa707cce8e339b189dd
tree28866ed514dc725bf89c821b22624a2d8ff32138
parent14d37a7f14569adbf7a019710762271fa2a9e739
apparmor: Fix undefined references to zstd_ symbols

Unfortunately the switch to using zstd compression did not properly
ifdef all the code that uses zstd_ symbols. So that if exporting of
binary policy is disabled in the config the compile will fail with the
following errors

security/apparmor/lsm.c:1545: undefined reference to `zstd_min_clevel'
aarch64-linux-ld: security/apparmor/lsm.c:1545: undefined reference to `zstd_max_clevel'

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Jon Tourville <jon.tourville@canonical.com>
security/apparmor/apparmorfs.c
security/apparmor/include/apparmor.h
security/apparmor/lsm.c