|
|
|
|
|
by loeg
3436 days ago
|
|
> systemd was using a magic value (-1) to represent an invalid mode_t value, and C's type system did not prevent passing it to the mode argument of open The open syscall should reject unrecognized flags in the mode argument (EINVAL), rather than just truncating down to recognized flags. That would also prevent this specific problem with the sentinel value being used on accident. |
|
* http://lxr.free-electrons.com/source/include/uapi/linux/stat...
* http://lxr.free-electrons.com/source/include/linux/types.h#L...