diff options
| author | Stephen Smalley <sds@tycho.nsa.gov> | 2014-02-18 11:15:52 -0500 |
|---|---|---|
| committer | Stephen Smalley <sds@tycho.nsa.gov> | 2014-02-18 11:15:52 -0500 |
| commit | 500308a7e67bfd4b918604a81b8125b8e7c2f37c (patch) | |
| tree | e87ca204595b7fd110e6ecfb1af3f1b142f9b1d9 | |
| parent | 27fd413d6d02a53c453cf926717b67e9a8d1eb32 (diff) | |
| download | system_core-500308a7e67bfd4b918604a81b8125b8e7c2f37c.zip system_core-500308a7e67bfd4b918604a81b8125b8e7c2f37c.tar.gz system_core-500308a7e67bfd4b918604a81b8125b8e7c2f37c.tar.bz2 | |
Add -D option to restorecon for relabeling /data/data.
This depends on change I137588013ed1750315702c0dbe088ce3e4a29e83.
Change-Id: I5a4fef9affd6cddf98d72dc9d54899be25741779
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
| -rw-r--r-- | toolbox/restorecon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/toolbox/restorecon.c b/toolbox/restorecon.c index 11532da..3568625 100644 --- a/toolbox/restorecon.c +++ b/toolbox/restorecon.c @@ -9,7 +9,7 @@ static const char *progname; static void usage(void) { - fprintf(stderr, "usage: %s [-FnrRv] pathname...\n", progname); + fprintf(stderr, "usage: %s [-DFnrRv] pathname...\n", progname); exit(1); } @@ -21,10 +21,13 @@ int restorecon_main(int argc, char **argv) progname = argv[0]; do { - ch = getopt(argc, argv, "FnrRv"); + ch = getopt(argc, argv, "DFnrRv"); if (ch == EOF) break; switch (ch) { + case 'D': + flags |= SELINUX_ANDROID_RESTORECON_DATADATA; + break; case 'F': flags |= SELINUX_ANDROID_RESTORECON_FORCE; break; |
