kernel: improve open(2) error handling
authorDaniel Fojt <df@neosystem.org>
Tue, 16 Jun 2020 05:23:19 +0000 (07:23 +0200)
committerDaniel Fojt <df@neosystem.org>
Tue, 16 Jun 2020 10:20:05 +0000 (12:20 +0200)
commit9f86c598efab81d1af92ee9a05c182532b581052
tree12a9e5bd108073dde325d06bbe77abee39b36c52
parent0072f73a7cbf975cbc8aea3ccea2df0ba7751c66
kernel: improve open(2) error handling

When trying to open a file with O_CREAT and O_EXCL flags while the file
exists, disregard the file permissions and always return EEXIST as
described in manpage and required by the standard.

Issue: https://bugs.dragonflybsd.org/issues/2953
sys/kern/vfs_vnops.c