OSDN Git Service

Implement SELinux ls -Z support.
authorElliott Hughes <enh@google.com>
Mon, 4 May 2015 17:56:16 +0000 (12:56 -0500)
committerRob Landley <rob@landley.net>
Mon, 4 May 2015 17:56:16 +0000 (12:56 -0500)
commit8565668d785d25f6dfd2dd19cece502cedf178b6
treeb38a7f663fe71c27ee1ecd2cdf50cbbb4463b4dc
parent483cfdabaf6ab282987a0a21d6177c3daa95dc12
Implement SELinux ls -Z support.

This patch uses lgetfilecon rather than fgetfilecon because
dirtree_parentfd always seems to return -1 in this function. If/when
the SMACK code is fixed to work with dirtree_parentfd, I'll send a
matching patch for SELinux.

In the meantime, this works, and although ls -h is still on my to-do
list, I think this patch is sufficient to let us replace toolbox ls
with toybox ls.
toys/posix/ls.c