<p dir="ltr">My only nit would be the variable name result....would it be better named is_permissive or something?</p>
<p dir="ltr">Otherwise LGTM. From the Android camp, this will be very helpful.</p>
<div class="gmail_quote">On Apr 30, 2014 8:43 AM, "Stephen Smalley" <<a href="mailto:stephen.smalley@gmail.com">stephen.smalley@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Attached patch switches to reporting permissive=0|1 and only does it<br>
for avc: denied messages.<br>
<br>
On Wed, Apr 30, 2014 at 8:18 AM, Stephen Smalley<br>
<<a href="mailto:stephen.smalley@gmail.com">stephen.smalley@gmail.com</a>> wrote:<br>
> I could make it permissive=0 or permissive=1 if that is less<br>
> confusing.  It doesn't necessarily correspond to the result of the<br>
> system call, just the avc_has_perm call, as e.g. the kernel checks<br>
> CAP_DAC_OVERRIDE and falls back to CAP_DAC_READ_SEARCH if only<br>
> read/search access was requested, and there are other cases where a<br>
> permission denial has a side effect rather than preventing the system<br>
> call (e.g. CAP_FSETID).<br>
><br>
> On Wed, Apr 30, 2014 at 6:34 AM, Daniel J Walsh <<a href="mailto:dwalsh@redhat.com">dwalsh@redhat.com</a>> wrote:<br>
>><br>
>> On 04/30/2014 09:29 AM, Steve Grubb wrote:<br>
>>> On Wednesday, April 30, 2014 08:59:50 AM Daniel J Walsh wrote:<br>
>>>> How about permitted rather then allowed.<br>
>>> I think permitted is already in an AVC.<br>
>> Not sure where.<br>
>>><br>
>>>> On 04/29/2014 10:59 PM, Eric Paris wrote:<br>
>>>>> On Tue, 2014-04-29 at 16:54 -0700, Stephen Smalley wrote:<br>
>>>>>> Requested for Android in order to distinguish denials that are not in<br>
>>>>>> fact breaking anything yet due to permissive domains versus denials<br>
>>>>>> that are being enforced, but seems generally useful.  result field was<br>
>>>>>> already in the selinux audit data structure and was being passed to<br>
>>>>>> avc_audit() but wasn't being used.  Seems to cause no harm to ausearch<br>
>>>>>> or audit2allow to add it as a field.  Comments?<br>
>>>>> I think it's a great idea, but I'm worried that Steve is going to get<br>
>>>>> grumpy because an AVC record is going to have a result= field which is<br>
>>>>> similar, but not necessarily related to the res= field of a SYSCALL<br>
>>>>> record.<br>
>>> I think that I'll have to parse this field no matter what. Its probably that<br>
>>> important. In the syscall, we use success= to be the final determination.<br>
>>><br>
>>><br>
>>>>> Seems easily confused (although probably 9999 times out of<br>
>>>>> 10000 they will be the same)<br>
>>> Why would this ever not be correct? Are there times when we get an AVC with a<br>
>>> denial _and_ the syscall completes successfully?<br>
>>><br>
>>> I'd suggest using res= since its in the audit dictionary and means exactly<br>
>>> what you are wanting to use it for. In it, 1 is success, 0 is failure.<br>
>>><br>
>> I have seen AVC's where the success=yes in enforcing mode.  Basically<br>
>> the kernel takes a different code path and the syscall succeeds.  Most<br>
>> of these end up as dontaudits.<br>
>>>>> So while I wholeheartedly think we should take the idea, I wonder if<br>
>>>>> someone can dream up a name that isn't confusingly similar...<br>
>>>>><br>
>>>>> I can't think of anything...<br>
>>> There is <a href="http://thesaurus.com" target="_blank">thesaurus.com</a>. :-)<br>
>>><br>
>>> consequence, outcome, effect, reaction,  conclusion, verdict, decision,<br>
>>> judgement, finding, ruling, answer, solution, recommendation, order,  ...<br>
>>><br>
>>> -Steve<br>
>><br>
<br>--<br>
Linux-audit mailing list<br>
<a href="mailto:Linux-audit@redhat.com">Linux-audit@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-audit" target="_blank">https://www.redhat.com/mailman/listinfo/linux-audit</a><br></blockquote></div>