Merge "Mention O_CREAT and O_TMPFILE in both open(2) fortify messages." am: 4fc8b0555f am: 35f3957ec4

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2117848

Change-Id: I2c2ee31f310b32b2abcf7f7f8a71252e2982bef4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-06-07 03:11:44 +00:00 committed by Automerger Merge Worker
commit edbe60ffb5

View file

@ -41,7 +41,7 @@ int __openat_real(int, const char*, int, ...) __RENAME(openat);
#if defined(__BIONIC_FORTIFY)
#define __open_too_many_args_error "too many arguments"
#define __open_too_few_args_error "called with O_CREAT or O_TMPFILE, but missing mode"
#define __open_useless_modes_warning "has superfluous mode bits; missing O_CREAT?"
#define __open_useless_modes_warning "has superfluous mode bits; missing O_CREAT or O_TMPFILE?"
/* O_TMPFILE shares bits with O_DIRECTORY. */
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)