platform_system_core/toolbox
Stephen Smalley 2761b71d3f Unify toolbox restorecon and libselinux restorecon implementations.
Extend the libselinux restorecon implementation to allow reuse
by the toolbox restorecon command.  This simply requires adding
support for the nochange (-n) and verbose (-v) options to the
libselinux functions and rewriting the toolbox restorecon command
to use the libselinux functions.   Also add a force (-F) option to
support forcing a restorecon_recursive even if the restorecon_last
attribute matches the current file_contexts hash so that we can
continue to force a restorecon via the toolbox command for testing
or when we know something else has changed (e.g. for when we support
relabeling /data/data and package information has changed).

Change-Id: I92bb3259790a7195ba56a5e9555c3b6c76ceb862
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-02-06 09:42:04 -05:00
..
cp Ported "cp" from NetBSD to toolbox. 2012-07-13 16:26:30 -07:00
grep Ported "grep" from NetBSD to toolbox. 2012-07-13 16:37:38 -07:00
alarm.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
Android.mk Remove obsolete 'setconsole' command. 2014-01-16 14:50:23 -08:00
cat.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
chcon.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
chmod.c Add -R to chmod 2010-07-14 13:30:11 -05:00
chown.c Merge "Change "chown" to coreutils syntax." 2012-03-02 16:10:50 -08:00
clear.c Added clear command to toolbox 2012-08-07 21:47:51 -07:00
cmp.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
date.c toolbox: Fix date tool with /dev/alarm 2014-01-09 18:59:23 -08:00
dd.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
dd.h Enable conv=fdatasync in dd. 2012-05-29 14:26:04 -07:00
df.c Fixed improper size displaying in 'df' utility 2012-10-02 10:39:19 +02:00
dmesg.c toolbox/dmesg: do not hardcode KLOG_BUF_LEN 2013-04-01 21:50:03 +05:30
du.c Make usage() static in du.c to avoid conflicts 2012-08-13 16:02:55 -04:00
dynarray.c toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
dynarray.h toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
exists.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
getenforce.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
getevent.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
getevent.h Enhance getevent to print event labels. 2011-06-15 17:44:52 -07:00
getprop.c Fix getprop Format 2011-02-14 17:17:21 -08:00
getsebool.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
hd.c Fix hd command so it doesn't error out on EOF 2012-01-12 15:17:07 -08:00
id.c Remove HAVE_SELINUX guards 2012-10-16 12:34:06 -07:00
ifconfig.c toolbox: ifconfig: Implement mtu setting, plus setting interface addr should 2009-05-14 07:28:52 -07:00
iftop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
insmod.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
ioctl.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
ionice.c system: Add support for getting/setting i/o priorities and include a userspace tool 2010-02-25 14:02:55 -08:00
kill.c Conditionally use SIGSTKFLT 2012-08-01 15:51:09 -07:00
ln.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
load_policy.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
log.c Move liblog headers to system/core/include/log 2013-07-24 12:32:39 -07:00
ls.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
lsmod.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
lsof.c fix strncat misuse 2013-06-03 12:13:36 -07:00
lsusb.c toolbox: add verbose option for lsusb 2010-12-09 17:14:27 -08:00
md5.c Add md5 command to toolbox. 2012-01-11 18:13:26 -08:00
mkdir.c Add -p support to mkdir 2010-07-14 13:29:42 -05:00
mkswap.c toolbox: swap utils 2013-06-25 13:21:53 -07:00
MODULE_LICENSE_BSD auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
mount.c Merge "fs_mgr: make block devices read-only" 2013-04-25 20:22:20 +00:00
mv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
nandread.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
netstat.c Fixed reversed output in netstat Recv-Q Send-Q columns 2013-06-03 19:24:44 -07:00
newfs_msdos.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
NOTICE Correct copyright header for uptime and NOTICE 2010-07-27 11:26:06 -07:00
notify.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
printenv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ps.c Add get_sched_policy_name() and use in ps and top 2012-03-15 15:10:45 -07:00
r.c Fix 'r' for LP64. 2014-01-17 09:50:56 -08:00
readlink.c Add standard options to readlink 2013-08-22 16:38:08 -07:00
readtty.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
renice.c toolbox: renice: Add -t TYPE parameter and switch to getopt 2013-01-22 16:59:36 -08:00
restorecon.c Unify toolbox restorecon and libselinux restorecon implementations. 2014-02-06 09:42:04 -05:00
rm.c Do not exit early on errors when -f is specified 2013-06-26 17:42:38 -07:00
rmdir.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rmmod.c toolbox: rmmod: fix module unloading 2012-05-15 18:01:34 +05:30
rotatefb.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
route.c Userland support for VM interconnection 2010-07-15 13:19:37 +02:00
runcon.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
schedtop.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
sendevent.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setenforce.c Make setenforce usage function static. 2012-08-13 12:56:23 -07:00
setkey.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setprop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setsebool.c Change setsebool syntax to be consistent with other init built-ins. 2012-12-13 15:41:53 -05:00
sleep.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
smd.c Automated import from //branches/master/...@142981,142981 2009-03-26 14:14:15 -07:00
start.c Restart surfaceflinger with stop/start too. 2011-03-07 10:39:17 -08:00
stop.c Restart surfaceflinger with stop/start too. 2011-03-07 10:39:17 -08:00
swapoff.c toolbox: swap utils 2013-06-25 13:21:53 -07:00
swapon.c SWAP_FLAG_* constants are now in <sys/swap.h>. 2014-01-07 18:20:17 -08:00
sync.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
syren.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
toolbox.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
top.c Add get_sched_policy_name() and use in ps and top 2012-03-15 15:10:45 -07:00
touch.c Update the touch command to take a human readable timestamp 2013-06-26 17:42:25 -07:00
umount.c Show why umount failed. 2011-07-14 13:43:57 -07:00
uptime.c toolbox: uptime: use clock_gettime() on devices without /dev/alarm 2013-12-17 14:45:39 -08:00
vmstat.c vmstat: Fix -n flag 2012-07-10 10:43:57 +05:30
watchprops.c toolbox: reimplement watchprops using __system_property_foreach() 2013-06-18 19:26:28 -07:00
wipe.c Try to unmount writable filesystems when rebooting 2011-03-10 18:11:46 -08:00