Improve builtin selinux implementation

This commit is contained in:
topjohnwu
2019-03-14 06:34:22 -04:00
parent b7e2e972c7
commit da0a72e8b0
5 changed files with 142 additions and 78 deletions

View File

@@ -262,6 +262,14 @@ int xlstat(const char *pathname, struct stat *buf) {
return ret;
}
int xfstat(int fd, struct stat *buf) {
int ret = fstat(fd, buf);
if (ret == -1) {
PLOGE("fstat %d", fd);
}
return ret;
}
int xdup2(int oldfd, int newfd) {
int ret = dup2(oldfd, newfd);
if (ret == -1) {