diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2021-10-02 12:43:35 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2021-10-02 15:41:02 -0300 |
commit | 3050ef0353e002a3c33214f039a64c2871650ca2 (patch) | |
tree | 94f9a64ca7144b6e38b49ae5b80ec4484667253c /etc/profile-a-l/cargo.profile | |
parent | Merge pull request #4585 from smitsohu/euid (diff) | |
download | firejail-3050ef0353e002a3c33214f039a64c2871650ca2.tar.gz firejail-3050ef0353e002a3c33214f039a64c2871650ca2.tar.zst firejail-3050ef0353e002a3c33214f039a64c2871650ca2.zip |
s/S_IWRITE/S_IWUSR/
They are equivalent, but only the latter is POSIX. See sys_stat.h(0p)
of POSIX.1-2017[1]. From Section 14.9.5, The Mode Bits for Access
Permission of the glibc manual[2]:
> S_IWUSR
> S_IWRITE
>
> Write permission bit for the owner of the file. Usually 0200.
> S_IWRITE is an obsolete synonym provided for BSD compatibility.
Current usage:
$ git grep -F S_IWRITE -- src | wc -l
11
$ git grep -F S_IWUSR -- src | wc -l
26
Commands used to search and replace:
$ git grep -l -z S_IWRITE -- src | xargs -0 -I '{}' sh -c \
"printf '%s\n' \"\`sed 's/S_IWRITE/S_IWUSR/g' '{}'\`\" >'{}'"
Note: The other related non-POSIX macros are not used anywhere:
$ git grep -F -e S_IREAD -e S_IEXEC -- src
$
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
[2] https://www.gnu.org/software/libc/manual/html_node/Permission-Bits.html
Diffstat (limited to 'etc/profile-a-l/cargo.profile')
0 files changed, 0 insertions, 0 deletions