mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
vmm: Let devmem devices reference the VM credential
Otherwise they are globally visible (in jails with allow.vmm set), instead of being restricted to the jail to which the VM belongs. Reviewed by: corvink, jhb Differential Revision: https://reviews.freebsd.org/D46448
This commit is contained in:
parent
c23da668fa
commit
72ea8f41e1
@ -997,7 +997,7 @@ devmem_create_cdev(struct vmmdev_softc *sc, int segid, char *devname)
|
||||
|
||||
vmname = vm_name(sc->vm);
|
||||
|
||||
error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &devmemsw, NULL,
|
||||
error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &devmemsw, sc->ucred,
|
||||
UID_ROOT, GID_WHEEL, 0600, "vmm.io/%s.%s", vmname, devname);
|
||||
if (error)
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user