In case someone wants the change in a diff format, those 5 seconds of work
are available here:

http://c66.it.su.se:8080/obsd/unveil.2.diff

I did not sort the existing return values in alphabetical order, there were
two out of order in there, but that is a separate commit I guess.


Den fre 15 sep. 2023 kl 00:25 skrev Zack Newman <z...@philomathiclife.com>:

> unveil(2) mentions the errors that errno will be set to upon failure;
> however it is missing ENOTDIR.
>
> Example C program that shows such an error under the assumption
> that /home/zack/foo is a file that exists:
> ---------------------------------------------------------------
> #include <errno.h>
> #include <stdio.h>
> #include <unistd.h>
>
> int main()
> {
>         int val = unveil("/home/zack/foo/", "r");
>         if (val < 0) {
>                 if (errno == ENOTDIR) {
>                         printf("ENOTDIR\n");
>                 }
>         }
>         return 0;
> }
> ---------------------------------------------------------------
> Adding something like
>
> .It Bq Er ENOTDIR
> .Fa path
> points to a file that is not a directory.
>
> to lib/libc/sys/unveil.2 should suffice.
>
>

-- 
May the most significant bit of your life be positive.

Reply via email to