mount: call into auth

This commit is contained in:
Matheus
2024-08-24 22:56:22 -03:00
parent 2190b331e8
commit 193f5b49b9
3 changed files with 17 additions and 1 deletions
+7
View File
@@ -74,6 +74,13 @@ int vfs_mount(vnode_t *backing, vnode_t *pathref, char *path, char *name, void *
if (err)
return err;
err = auth_filesystem_check(getcred(), AUTH_ACTIONS_FILESYSTEM_MOUNT, mounton);
if (err) {
VOP_RELEASE(mounton);
return err;
}
if (mounton->type != V_TYPE_DIR) {
VOP_RELEASE(mounton);
return ENOTDIR;