Re: [PATCH] Smack: Fix wrong semantics in smk_access_entry()

From: Tianjia Zhang
Date: Tue Jul 20 2021 - 23:14:15 EST




On 7/21/21 12:32 AM, Casey Schaufler wrote:
On 7/15/2021 8:15 AM, Casey Schaufler wrote:
On 7/15/2021 2:17 AM, Tianjia Zhang wrote:
In the smk_access_entry() function, if no matching rule is found
in the rust_list, a negative error code will be used to perform bit
operations with the MAY_ enumeration value. This is semantically
wrong. This patch fixes this issue.
Indeed, the code as written is functioning correctly by
sheer luck. I will take this patch. Thank you.

Signed-off-by: Tianjia Zhang <tianjia.zhang@xxxxxxxxxxxxxxxxx>

Added to the Smack next branch.


Great, Thanks.

Tianjia