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

Skip to content
Commit 3ef54f28 authored by George Burgess IV's avatar George Burgess IV
Browse files

Add permission bits to open calls with O_CREAT

Open needs a third argument if you pass it O_CREAT:
https://linux.die.net/man/3/open

This turns into a compile-time error with FORITFY, so we need this fixed
before our unbroken FORTIFY can go in.

(The TEMP_FAILURE_RETRY open isn't detected by clang FORTIFY, but I
noticed that open_reference_profile potentially passes in O_CREAT as an
open_flag.)

Bug: 32073964
Test: Now builds with clang FORTIFY; CtsCompilationTestCases passes;
manually verified that /data/misc/profiles/ref/*/primary.prof has rw
permissions after a successful `cmd package compile -m speed-profile`.
Change-Id: Ie707d5ad403d2f86c769277b3e0f147c45000a6b
parent 70a5f120
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment