Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97690a28 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "fs_mkdirs: use O_NOFOLLOW and O_CLOEXEC"

parents b3afd6c7 30a86ebc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ int fs_mkdirs(const char* path, mode_t mode) {

            /* Yay, segment is ready for us to step into */
            int next_fd;
            if ((next_fd = openat(fd, segment, 0)) == -1) {
            if ((next_fd = openat(fd, segment, O_NOFOLLOW | O_CLOEXEC)) == -1) {
                ALOGE("Failed to openat(%s): %s", buf, strerror(errno));
                res = -errno;
                goto done_close;