vfs: add VOP_ACCESS check to vfs_create

This commit is contained in:
Matheus
2024-08-25 12:07:30 -03:00
parent d7b33ffe42
commit 58f3129da2
+6
View File
@@ -141,6 +141,12 @@ int vfs_create(vnode_t *ref, char *path, vattr_t *attr, int type, vnode_t **node
if (err)
goto cleanup;
err = VOP_ACCESS(parent, V_ACCESS_WRITE, getcred());
if (err) {
VOP_RELEASE(parent);
goto cleanup;
}
vnode_t *ret;
err = VOP_CREATE(parent, component, attr, type, &ret, getcred());
VOP_RELEASE(parent);