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.