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

Commit 99277732 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "init: add missing O_CLOEXEC" am: 687b5526 am: 401d0013

am: aaf75969

Change-Id: I0484084380a972f20ed17eb14e32095936f97871
parents 1f3b396a aaf75969
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ Result<void> WritePersistentPropertyFile(const PersistentProperties& persistent_
    // Note in this case, that the source and destination directories are the same, so only one
    // fsync() is required.
    auto dir = Dirname(persistent_property_filename);
    auto dir_fd = unique_fd{open(dir.c_str(), O_DIRECTORY | O_RDONLY)};
    auto dir_fd = unique_fd{open(dir.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC)};
    if (dir_fd < 0) {
        return ErrnoError() << "Unable to open persistent properties directory for fsync()";
    }