Re: [PATCH] um: Accept /dev/fd/* uml block devices

2013-07-31 Thread Gabriel de Perthuis
Le 28/07/2013 12:25, Gabriel de Perthuis a écrit : > Le dim. 28 juil. 2013 10:12:37 CEST, Richard Weinberger a écrit : >> Am 27.07.2013 17:23, schrieb Gabriel de Perthuis: >>> Useful for >>> * limiting privileges >>> * opening block devices O_EXCL >> >> So, the goal of this patch is to allow passin

Re: [PATCH] um: Accept /dev/fd/* uml block devices

2013-07-28 Thread Gabriel de Perthuis
Le dim. 28 juil. 2013 10:12:37 CEST, Richard Weinberger a écrit : > Am 27.07.2013 17:23, schrieb Gabriel de Perthuis: >> Useful for >> * limiting privileges >> * opening block devices O_EXCL > > So, the goal of this patch is to allow passing a file descriptor > number as block device instead of a f

Re: [PATCH] um: Accept /dev/fd/* uml block devices

2013-07-28 Thread Richard Weinberger
Am 27.07.2013 17:23, schrieb Gabriel de Perthuis: > Useful for > * limiting privileges > * opening block devices O_EXCL So, the goal of this patch is to allow passing a file descriptor number as block device instead of a file? I assume you have already a wrapper around UML which exec()'s it such

[PATCH] um: Accept /dev/fd/* uml block devices

2013-07-27 Thread Gabriel de Perthuis
Useful for * limiting privileges * opening block devices O_EXCL Use dup to work around the fact /proc/self/fd can't be opened after dropping privileges. This proc behaviour doesn't match TLPI and might be a bug. Qemu has a slightly more complex fdset approach that provides fds with different acce