am 62643302: Merge "Not all filesystems support setting SELinux labels."
* commit '626433024df69520b0b45da563b8afce750b25c6': Not all filesystems support setting SELinux labels.
This commit is contained in:
commit
9492db23b9
1 changed files with 3 additions and 4 deletions
|
|
@ -71,6 +71,7 @@ static bool secure_mkdirs(const std::string& path) {
|
||||||
if (chown(partial_path.c_str(), uid, gid) == -1) {
|
if (chown(partial_path.c_str(), uid, gid) == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Not all filesystems support setting SELinux labels. http://b/23530370.
|
||||||
selinux_android_restorecon(partial_path.c_str(), 0);
|
selinux_android_restorecon(partial_path.c_str(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,10 +167,8 @@ static bool handle_send_file(int s, const char* path, uid_t uid,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selinux_android_restorecon(path, 0) == -1) {
|
// Not all filesystems support setting SELinux labels. http://b/23530370.
|
||||||
SendSyncFailErrno(s, "selinux_android_restorecon failed");
|
selinux_android_restorecon(path, 0);
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fchown clears the setuid bit - restore it if present.
|
// fchown clears the setuid bit - restore it if present.
|
||||||
// Ignore the result of calling fchmod. It's not supported
|
// Ignore the result of calling fchmod. It's not supported
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue