Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 23:57:24 +0200, Sebastian Benoit wrote: > Well, if you do that, i think some callers need a look, for example That change was specific to F_SETLK so the callers you reference are not affected. However, I did miss F_GETLK, which needs the same treatment. - todd Index: sys/

Re: better error descriptions for locking non-files

2019-06-25 Thread Sebastian Benoit
Todd C. Miller(mill...@openbsd.org) on 2019.06.25 09:27:19 -0600: > On Tue, 25 Jun 2019 09:18:28 -0600, "Todd C. Miller" wrote: > > > The ERRORS section could be clearer as to what error you get when > > you try to lock a socket/fifo. > > Actually, for fcntl(2), we should be returning EINVAL, not

Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 09:18:28 -0600, Todd C. Miller wrote: > The ERRORS section could be clearer as to what error you get when > you try to lock a socket/fifo. There is no need to change fcntl.2 or lockf.2, they already document the behavior under EINVAL. The only outlier now is flock.2 so use th

Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 09:18:28 -0600, "Todd C. Miller" wrote: > The ERRORS section could be clearer as to what error you get when > you try to lock a socket/fifo. Actually, for fcntl(2), we should be returning EINVAL, not EBADF when trying to lock a non-file. Let's fix that first. - todd Index:

better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
The ERRORS section could be clearer as to what error you get when you try to lock a socket/fifo. - todd Index: lib/libc/gen/lockf.3 === RCS file: /cvs/src/lib/libc/gen/lockf.3,v retrieving revision 1.13 diff -u -p -u -r1.13 lockf.3