am 488b5eaf: am 2e7347d6: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit '488b5eafe368781077b367a9afd68db303bc8891': Convert all selinux_android_restorecon and _setfilecon calls to new API.
This commit is contained in:
commit
e41420bd8c
4 changed files with 6 additions and 6 deletions
|
|
@ -68,7 +68,7 @@ static int mkdirs(char *name)
|
||||||
*x = '/';
|
*x = '/';
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
selinux_android_restorecon(name);
|
selinux_android_restorecon(name, 0);
|
||||||
}
|
}
|
||||||
*x++ = '/';
|
*x++ = '/';
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +246,7 @@ static int handle_send_file(int s, char *path, uid_t uid,
|
||||||
if(fd >= 0) {
|
if(fd >= 0) {
|
||||||
struct utimbuf u;
|
struct utimbuf u;
|
||||||
adb_close(fd);
|
adb_close(fd);
|
||||||
selinux_android_restorecon(path);
|
selinux_android_restorecon(path, 0);
|
||||||
u.actime = timestamp;
|
u.actime = timestamp;
|
||||||
u.modtime = timestamp;
|
u.modtime = timestamp;
|
||||||
utime(path, &u);
|
utime(path, &u);
|
||||||
|
|
|
||||||
|
|
@ -732,7 +732,7 @@ char* engrave_tombstone(
|
||||||
LOG("failed to change ownership of %s: %s\n", TOMBSTONE_DIR, strerror(errno));
|
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;
|
*detach_failed = false;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -527,10 +527,10 @@ int make_dir(const char *path, mode_t mode)
|
||||||
|
|
||||||
int restorecon(const char* pathname)
|
int restorecon(const char* pathname)
|
||||||
{
|
{
|
||||||
return selinux_android_restorecon(pathname);
|
return selinux_android_restorecon(pathname, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int restorecon_recursive(const char* pathname)
|
int restorecon_recursive(const char* pathname)
|
||||||
{
|
{
|
||||||
return selinux_android_restorecon_recursive(pathname);
|
return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ int restorecon_main(int argc, char **argv)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
rc = selinux_android_restorecon_flags(argv[i], flags);
|
rc = selinux_android_restorecon(argv[i], flags);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
fprintf(stderr, "Could not restorecon %s: %s\n", argv[i],
|
fprintf(stderr, "Could not restorecon %s: %s\n", argv[i],
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue