<p dir="ltr">Yes Stephen is correct. I was suggesting a change to the variable not to the key in the output KVP.</p>
<p dir="ltr">However...Stephens patch would grow in size and he would have to type that much more :-)</p>
<div class="gmail_quote">On Apr 30, 2014 9:08 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">
The revised patch switched from result=allowed|denied to<br>
permissive=0|1 in the avc message.  I think Bill's point was with<br>
respect to the code, which still internally is passing around the<br>
result of the decision and inferring the permissive state from it,<br>
rather than the output string itself.<br>
<br>
On Wed, Apr 30, 2014 at 9:01 AM, Steve Grubb <<a href="mailto:sgrubb@redhat.com">sgrubb@redhat.com</a>> wrote:<br>
> On Wednesday, April 30, 2014 08:48:31 AM William Roberts wrote:<br>
>> My only nit would be the variable name result....would it be better named<br>
>> is_permissive or something?<br>
><br>
> That adds more bytes. My personal taste would be to abbreviate it to save<br>
> bytes. They add up when you have 100's of thousands of events per day.<br>
><br>
> -Steve<br>
><br>
><br>
>> Otherwise LGTM. From the Android camp, this will be very helpful.<br>
>> On Apr 30, 2014 8:43 AM, "Stephen Smalley" <<a href="mailto:stephen.smalley@gmail.com">stephen.smalley@gmail.com</a>><br>
>><br>
>> wrote:<br>
>> > 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>
>> ><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>><br>
>> ><br>
>> > wrote:<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>
>> > >>><br>
>> > >>> I think permitted is already in an AVC.<br>
>> > >><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<br>
>> ><br>
>> > in<br>
>> ><br>
>> > >>>>>> fact breaking anything yet due to permissive domains versus denials<br>
>> > >>>>>> that are being enforced, but seems generally useful.  result field<br>
>> ><br>
>> > was<br>
>> ><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<br>
>> ><br>
>> > ausearch<br>
>> ><br>
>> > >>>>>> or audit2allow to add it as a field.  Comments?<br>
>> > >>>>><br>
>> > >>>>> I think it's a great idea, but I'm worried that Steve is going to<br>
>> > >>>>> get<br>
>> > >>>>> grumpy because an AVC record is going to have a result= field which<br>
>> ><br>
>> > is<br>
>> ><br>
>> > >>>>> similar, but not necessarily related to the res= field of a SYSCALL<br>
>> > >>>>> record.<br>
>> > >>><br>
>> > >>> I think that I'll have to parse this field no matter what. Its<br>
>> ><br>
>> > probably that<br>
>> ><br>
>> > >>> important. In the syscall, we use success= to be the final<br>
>> ><br>
>> > determination.<br>
>> ><br>
>> > >>>>> Seems easily confused (although probably 9999 times out of<br>
>> > >>>>> 10000 they will be the same)<br>
>> > >>><br>
>> > >>> Why would this ever not be correct? Are there times when we get an AVC<br>
>> ><br>
>> > with a<br>
>> ><br>
>> > >>> denial _and_ the syscall completes successfully?<br>
>> > >>><br>
>> > >>> I'd suggest using res= since its in the audit dictionary and means<br>
>> ><br>
>> > exactly<br>
>> ><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>
>> > >><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>
>> > >>><br>
>> > >>> There is <a href="http://thesaurus.com" target="_blank">thesaurus.com</a>. :-)<br>
>> > >>><br>
>> > >>> consequence, outcome, effect, reaction,  conclusion, verdict,<br>
>> > >>> decision,<br>
>> > >>> judgement, finding, ruling, answer, solution, recommendation, order,<br>
>> ><br>
>> >  ...<br>
>> ><br>
>> > >>> -Steve<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>
><br>
</blockquote></div>