lsm: cleanup the size counters in security_getselfattr()
authorPaul Moore <paul@paul-moore.com>
Tue, 24 Oct 2023 16:38:40 +0000 (12:38 -0400)
committerPaul Moore <paul@paul-moore.com>
Mon, 13 Nov 2023 03:54:42 +0000 (22:54 -0500)
commitdc46db78b9747f8114030982ee5c2faf2faaeddd
treebfea48e1ca1a6c4229e4e156085951d59fa820aa
parentaab30be071f7048c9c23c61e6eddd55bba328398
lsm: cleanup the size counters in security_getselfattr()

Zero out all of the size counters in the -E2BIG case (buffer too
small) to help make the current code a bit more robust in the face of
future code changes.

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/security.c