Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam_namespace: protect_dir(): use O_DIRECTORY to prevent local DoS si…
…tuations Without O_DIRECTORY the path crawling logic is subject to e.g. FIFOs being placed in user controlled directories, causing the PAM module to block indefinitely during `openat()`. Pass O_DIRECTORY to cause the `openat()` to fail if the path does not refer to a directory. With this the check whether the final path element is a directory becomes unnecessary, drop it.
- Loading branch information