[Toybox] [PATCH] Implement SELinux ls -Z support.

Rob Landley rob at landley.net
Sat May 16 15:36:17 PDT 2015


On 05/16/2015 03:49 PM, enh wrote:
>     Looking at the SELINUX stuff and comparing with ubuntu's man pages:
>     security_context_t is a char *, and freecon() is just free()? Is this an
>     android-ism or is this how Red Hat Enterprise wrote it to take away
>     Sun's
>     Navy contacts a decade and change back? I don't know what's expected
>     here,
>     I did a grep, but the string "freecon" does not appear in the musl
>     source
>     code (as of April 14th anyway).
> 
> 
> from selinux/selinux.h:
> 
> /* No longer used; here for compatibility with legacy callers. */
> typedef char *security_context_t;
> 
> 
> i'll ask whether there are plans to deprecate freecon.

Apparently deprecating it was suggested nine years ago:

http://marc.info/?l=selinux&m=114119285931253&w=2

To which the response was, on March 9, 2006, and I quote:

http://marc.info/?l=selinux&m=114192692207649&w=2

> Just to note:  I haven't forgotten about this patch, but I plan to wait
> until we make another release of the libraries before we start
> deprecating these interfaces, and then do it for real (i.e. version the
> libselinux interface via a map file).
> 
> -- 
> Stephen Smalley
> National Security Agency

I'm just gonna use free() for this.

Thanks,

Rob

 1431815777.0


More information about the Toybox mailing list