This will be soon be used to emulate BREAK commands in vmd(8).
ok nicm@, ccardenas@, deraadt@
-/* $OpenBSD: kern_pledge.c,v 1.226 2017/12/12 01:12:34 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.227 2018/01/08 11:54:28 mpi Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
if (cdevsw[major(vp->v_rdev)].d_open != ptmopen)
break;
return (0);
+ case TIOCUCNTL: /* vmd */
+ if ((p->p_p->ps_pledge & PLEDGE_RPATH) == 0)
+ break;
+ if ((p->p_p->ps_pledge & PLEDGE_WPATH) == 0)
+ break;
+ if (cdevsw[major(vp->v_rdev)].d_open != ptcopen)
+ break;
+ return (0);
#endif /* NPTY > 0 */
case TIOCSPGRP:
if ((p->p_p->ps_pledge & PLEDGE_PROC) == 0)