diff options
| author | Nick Kralevich <nnk@google.com> | 2014-02-12 23:09:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-12 23:09:28 +0000 |
| commit | 2e7347d617b02b13d227bb4cecf6bd69b7b20fa9 (patch) | |
| tree | db646cc74615b92769c20c4a9b0794c95ec5adc3 | |
| parent | dc97eec05232a5d64b6425043b48eafaf63cef7f (diff) | |
| parent | 27a93650c0df02e4cd3c48bbec8acee8b817a012 (diff) | |
| download | system_core-2e7347d617b02b13d227bb4cecf6bd69b7b20fa9.zip system_core-2e7347d617b02b13d227bb4cecf6bd69b7b20fa9.tar.gz system_core-2e7347d617b02b13d227bb4cecf6bd69b7b20fa9.tar.bz2 | |
Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
| -rw-r--r-- | adb/file_sync_service.c | 4 | ||||
| -rwxr-xr-x | debuggerd/tombstone.cpp | 2 | ||||
| -rw-r--r-- | init/util.c | 4 | ||||
| -rw-r--r-- | toolbox/restorecon.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/adb/file_sync_service.c b/adb/file_sync_service.c index 577fb8f..e981c2a 100644 --- a/adb/file_sync_service.c +++ b/adb/file_sync_service.c @@ -68,7 +68,7 @@ static int mkdirs(char *name) *x = '/'; return ret; } - selinux_android_restorecon(name); + selinux_android_restorecon(name, 0); } *x++ = '/'; } @@ -246,7 +246,7 @@ static int handle_send_file(int s, char *path, uid_t uid, if(fd >= 0) { struct utimbuf u; adb_close(fd); - selinux_android_restorecon(path); + selinux_android_restorecon(path, 0); u.actime = timestamp; u.modtime = timestamp; utime(path, &u); diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp index 91d95fc..6a1b963 100755 --- a/debuggerd/tombstone.cpp +++ b/debuggerd/tombstone.cpp @@ -732,7 +732,7 @@ char* engrave_tombstone( LOG("failed to change ownership of %s: %s\n", TOMBSTONE_DIR, strerror(errno)); } - if (selinux_android_restorecon(TOMBSTONE_DIR) == -1) { + if (selinux_android_restorecon(TOMBSTONE_DIR, 0) == -1) { *detach_failed = false; return NULL; } diff --git a/init/util.c b/init/util.c index e772342..0f69e1c 100644 --- a/init/util.c +++ b/init/util.c @@ -527,10 +527,10 @@ int make_dir(const char *path, mode_t mode) int restorecon(const char* pathname) { - return selinux_android_restorecon(pathname); + return selinux_android_restorecon(pathname, 0); } int restorecon_recursive(const char* pathname) { - return selinux_android_restorecon_recursive(pathname); + return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE); } diff --git a/toolbox/restorecon.c b/toolbox/restorecon.c index 137e9fa..11532da 100644 --- a/toolbox/restorecon.c +++ b/toolbox/restorecon.c @@ -49,7 +49,7 @@ int restorecon_main(int argc, char **argv) usage(); for (i = 0; i < argc; i++) { - rc = selinux_android_restorecon_flags(argv[i], flags); + rc = selinux_android_restorecon(argv[i], flags); if (rc < 0) fprintf(stderr, "Could not restorecon %s: %s\n", argv[i], strerror(errno)); |
