vfs: access check on vfs_lookup

This commit is contained in:
Matheus
2024-08-24 20:21:42 -03:00
parent 4d51507953
commit 357f5c65cf
3 changed files with 8 additions and 1 deletions
+4
View File
@@ -523,6 +523,10 @@ int vfs_lookup(vnode_t **result, vnode_t *start, char *path, char *lastcomp, int
}
}
error = VOP_ACCESS(current, V_ACCESS_SEARCH, getcred());
if (error)
break;
error = VOP_LOOKUP(current, component, &next, getcred());
if (error)
break;