On 02/26/2012 10:56 PM, Sven Breuner wrote:
> Pádraig Brady wrote on 02/20/2012 11:54 AM:
>> On 02/20/2012 02:06 AM, Sven Breuner wrote:
>>> Pádraig Brady wrote on 02/20/2012 12:54 AM:
>>>> I just booted RHEL 6.2 with selinux=0 on the kernel command line,
>>>> so as I could test new files without a context created, and...
>>>>
>>>> getxattr("security.selinux") on new files on tmpfs, returns ENOTSUP
>>>> [...]
>>>
>>> Seems to be inconsistent. Some of our RHEL 6.x systems return "unlabled" on
>>> a tmpfs:
>>> [...]
>>
>> I thought the difference might be selinux=0 boot param,
>> versus selinux=disabled in /etc/selinux/config, but that's not significant.
>
> You were right, Pádraig. Booting the machines that previously returned
> "unlabled" with "selinux=0" makes them return EOPNOTSUPP.
Thanks for confirming that.
My intuition was right, but I must have messed up something.
Or maybe it's dependent on your kernel ver.
Anyway you now have the solution to avoid all extraneous getxattr calls.
cheers,
Pádraig.