Loading cmds/installd/utils.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ static int _delete_dir_contents(DIR *d, if ((name[1] == '.') && (name[2] == 0)) continue; } subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW); subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (subfd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); result = -1; Loading Loading @@ -316,7 +316,7 @@ int delete_dir_contents_fd(int dfd, const char *name) int fd, res; DIR *d; fd = openat(dfd, name, O_RDONLY | O_DIRECTORY); fd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (fd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); return -1; Loading Loading @@ -656,7 +656,7 @@ static int _add_cache_files(cache_t *cache, cache_dir_t *parentDir, const char * if ((name[1] == '.') && (name[2] == 0)) continue; } subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY); subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (subfd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); continue; Loading Loading
cmds/installd/utils.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ static int _delete_dir_contents(DIR *d, if ((name[1] == '.') && (name[2] == 0)) continue; } subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW); subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (subfd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); result = -1; Loading Loading @@ -316,7 +316,7 @@ int delete_dir_contents_fd(int dfd, const char *name) int fd, res; DIR *d; fd = openat(dfd, name, O_RDONLY | O_DIRECTORY); fd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (fd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); return -1; Loading Loading @@ -656,7 +656,7 @@ static int _add_cache_files(cache_t *cache, cache_dir_t *parentDir, const char * if ((name[1] == '.') && (name[2] == 0)) continue; } subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY); subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (subfd < 0) { ALOGE("Couldn't openat %s: %s\n", name, strerror(errno)); continue; Loading