libselinux - Mapped compute functions now obey deny_unknown flag
PATCH 1/1 libselinux - Mapped compute functions now obey deny_unknown flag
If selinux_set_mapping(3) is used to map classes, and an invalid class is used to compute a decision (tclass = 0), the result did not obey the status of the deny_unknown flag.
--- libselinux/src/compute_av.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
libselinux/src/compute_av.c +2 -0
@@ -60,6 +60,8 @@ int security_compute_av_flags_raw(const security_context_t scon, }else if (ret <6 ) avd->flags =0 ; +/* If tclass invalid, kernel sets avd according to deny_unknown flag */ +if (tclass !=0 )map_decision (tclass, avd); ret =0 ;
Signature · 10 lines
1.7.7.1 Richard -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Eric Paris
Appliedapplied to my devel branch. This one messed up the formatting, since you should have indented the map_decision() call after you put it 'inside' the conditional. I fixed it before I applied.
-Eric
Quoted 24 lines · Richard Haines
If
selinux_set_mapping(3)is used to map classes, and an invalid class is used to compute a decision (tclass = 0), the result did not obey the status of thedeny_unknownflag.Signed-off-by Richard Haines <[email protected]>---
libselinux/src/compute_av.c | 2 ++1 files changed, 2 insertions(+), 0 deletions(-)libselinux/src/compute_av.c +2
-1@@ -60,6 +60,8 @@ int security_compute_av_flags_raw(const security_context_t scon, } else if (ret < 6) avd->flags = 0; + /* If tclass invalid, kernel sets avd according to deny_unknown flag */ + if (tclass != 0) map_decision(tclass, avd); ret = 0; --1.7.7.1
Quoted 7 lines
Richard
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.