nsresourced: Add comment about mknod() hook covering regular files

This commit is contained in:
Daan De Meyer
2026-02-05 15:16:31 +01:00
committed by Daan De Meyer
parent d1ae0e5205
commit 14054134c6
@@ -140,6 +140,8 @@ int BPF_PROG(userns_restrict_path_mkdir, struct path *dir, struct dentry *dentry
return validate_path(dir, ret);
}
/* The mknod hook covers all file creations, including regular files, in case the reader is looking for a
* missing hook for open(). */
SEC("lsm/path_mknod")
int BPF_PROG(userns_restrict_path_mknod, const struct path *dir, struct dentry *dentry, umode_t mode, unsigned dev, int ret) {
return validate_path(dir, ret);