Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-23 Thread Stefan Hajnoczi
On Wed, Jun 17, 2020 at 08:55:36AM -0400, Colin Walters wrote: > On Wed, Jun 17, 2020, at 8:50 AM, Stefan Hajnoczi wrote: > > > Something along these lines should work. Hopefully seccomp can be > > retained. It would also be necessary to check how not having the shared > > directory as / in the mo

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-17 Thread Colin Walters
On Wed, Jun 17, 2020, at 8:50 AM, Stefan Hajnoczi wrote: > Something along these lines should work. Hopefully seccomp can be > retained. It would also be necessary to check how not having the shared > directory as / in the mount namespace affects functionality. For one, > I'm pretty sure symlin

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-17 Thread Stefan Hajnoczi
On Tue, Jun 02, 2020 at 09:53:18PM -0400, Colin Walters wrote: > On Tue, Jun 2, 2020, at 5:55 AM, Stefan Hajnoczi wrote: > > Ping Colin. It would be great if you have time to share your thoughts on > > this discussion and explain how you are using this patch. > > Yeah sorry about not replying in t

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-02 Thread Colin Walters
On Tue, Jun 2, 2020, at 5:55 AM, Stefan Hajnoczi wrote: > > Ping Colin. It would be great if you have time to share your thoughts on > this discussion and explain how you are using this patch. Yeah sorry about not replying in this thread earlier, this was just a quick Friday side project for

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-02 Thread Stefan Hajnoczi
On Fri, May 01, 2020 at 02:25:48PM -0400, Colin Walters wrote: > I'd like to make use of virtiofs as part of our tooling in > https://github.com/coreos/coreos-assembler > Most of the code runs as non-root today; qemu also runs as non-root. > We use 9p right now. > > virtiofsd's builtin sandboxing

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-27 Thread Stefan Hajnoczi
On Thu, May 21, 2020 at 11:43:44AM +0100, Daniel P. Berrangé wrote: > On Thu, May 21, 2020 at 11:19:23AM +0100, Stefan Hajnoczi wrote: > > On Thu, May 07, 2020 at 10:28:32AM +0100, Daniel P. Berrangé wrote: > > > If the person in the host launching virtiofsd is non-root, then > > > user namespaces

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-21 Thread Daniel P . Berrangé
On Thu, May 21, 2020 at 11:19:23AM +0100, Stefan Hajnoczi wrote: > On Thu, May 07, 2020 at 10:28:32AM +0100, Daniel P. Berrangé wrote: > > If the person in the host launching virtiofsd is non-root, then > > user namespaces mean they can offer the guest the full range of > > POSIX APIs wrt access co

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-21 Thread Stefan Hajnoczi
On Thu, May 07, 2020 at 10:28:32AM +0100, Daniel P. Berrangé wrote: > If the person in the host launching virtiofsd is non-root, then > user namespaces mean they can offer the guest the full range of > POSIX APIs wrt access control & file ownership, since they're > no longer restricted to their sin

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-07 Thread Daniel P . Berrangé
On Wed, May 06, 2020 at 08:16:14PM +0100, Dr. David Alan Gilbert wrote: > * Colin Walters (walt...@verbum.org) wrote: > > I'd like to make use of virtiofs as part of our tooling in > > https://github.com/coreos/coreos-assembler > > Most of the code runs as non-root today; qemu also runs as non-root

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-06 Thread Dr. David Alan Gilbert
* Colin Walters (walt...@verbum.org) wrote: > I'd like to make use of virtiofs as part of our tooling in > https://github.com/coreos/coreos-assembler > Most of the code runs as non-root today; qemu also runs as non-root. > We use 9p right now. > > virtiofsd's builtin sandboxing effectively assumes

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-05 Thread Daniel P . Berrangé
On Tue, May 05, 2020 at 04:23:59PM +0100, Stefan Hajnoczi wrote: > On Mon, May 04, 2020 at 04:07:22PM +0200, Marc-André Lureau wrote: > > Hi > > > > On Fri, May 1, 2020 at 8:29 PM Colin Walters wrote: > > > > > > I'd like to make use of virtiofs as part of our tooling in > > > https://github.com/

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-05 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 04:07:22PM +0200, Marc-André Lureau wrote: > Hi > > On Fri, May 1, 2020 at 8:29 PM Colin Walters wrote: > > > > I'd like to make use of virtiofs as part of our tooling in > > https://github.com/coreos/coreos-assembler > > Most of the code runs as non-root today; qemu also

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-04 Thread Marc-André Lureau
Hi On Mon, May 4, 2020 at 4:27 PM Colin Walters wrote: > > > > On Mon, May 4, 2020, at 10:07 AM, Marc-André Lureau wrote: > > > Now that systemd-nspawn works without privileges, isn't that also a > > solution? One that would fit both system and session level > > permissions, and integration with

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-04 Thread Colin Walters
On Mon, May 4, 2020, at 10:07 AM, Marc-André Lureau wrote: > Now that systemd-nspawn works without privileges, isn't that also a > solution? One that would fit both system and session level > permissions, and integration with other services? This is a complex topic and one I should probably wr

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-04 Thread Marc-André Lureau
Hi On Fri, May 1, 2020 at 8:29 PM Colin Walters wrote: > > I'd like to make use of virtiofs as part of our tooling in > https://github.com/coreos/coreos-assembler > Most of the code runs as non-root today; qemu also runs as non-root. > We use 9p right now. > > virtiofsd's builtin sandboxing effec

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-04 Thread Stefan Hajnoczi
On Fri, May 01, 2020 at 02:25:48PM -0400, Colin Walters wrote: > I'd like to make use of virtiofs as part of our tooling in > https://github.com/coreos/coreos-assembler > Most of the code runs as non-root today; qemu also runs as non-root. > We use 9p right now. > > virtiofsd's builtin sandboxing

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-04 Thread Daniel P . Berrangé
On Fri, May 01, 2020 at 02:25:48PM -0400, Colin Walters wrote: > I'd like to make use of virtiofs as part of our tooling in > https://github.com/coreos/coreos-assembler > Most of the code runs as non-root today; qemu also runs as non-root. > We use 9p right now. > > virtiofsd's builtin sandboxing

[PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-01 Thread Colin Walters
I'd like to make use of virtiofs as part of our tooling in https://github.com/coreos/coreos-assembler Most of the code runs as non-root today; qemu also runs as non-root. We use 9p right now. virtiofsd's builtin sandboxing effectively assumes it runs as root. First, change the code to use `clone(