apparmor: don't create raw_sha1 symlink if sha1 hashing is disabled
authorJohn Johansen <john.johansen@canonical.com>
Fri, 5 Feb 2021 12:56:02 +0000 (04:56 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 29 Dec 2021 01:24:14 +0000 (17:24 -0800)
commit39945055a7c596a6393623ed1c14797799c3ab39
tree27918400c171b5ec55120dffd42de7d4a0e100b9
parentfda01a1f8d07bf326c8f51da9e10742d5d3a802f
apparmor: don't create raw_sha1 symlink if sha1 hashing is disabled

Currently if sha1 hashing of policy is disabled a sha1 hash symlink
to the non-existent file is created. There is now reason to create
the symlink in this case so don't do it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/apparmorfs.c