Re: Add ENOTDIR as possible error to unveil(2)

2023-09-16 Thread Zack Newman
On 9/16/23 11:01, Zack Newman wrote: Looking at sys_unveil in /sys/kern/vfs_syscalls.c, i suspect that errno actually comes from a lower layer, likely namei(9), rather than from unveil(2) itself. That is also true for EFAULT which is described. I also noticed that EACCESS is returned on line

Re: Add ENOTDIR as possible error to unveil(2)

2023-09-16 Thread Zack Newman
On 9/16/23 10:45, Ingo Schwarze wrote: That diff is certainly not OK. It is misleading because a "path" argument pointing to a file that is not a directory is actually valid. The problem only occurs when you add a trailing slash to the name of a file that is not a directory, like this: Yes, wh

Add ENOTDIR as possible error to unveil(2)

2023-09-14 Thread Zack Newman
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 #include #incl