Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-11-08 Thread Ian Jackson
Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Ian Jackson writes: > > qemu_strtoul fails (returns an error) if the delimiter (that is, the > > first character which is not processed as digit by strtoul) is not > >

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-11-06 Thread Markus Armbruster
Ian Jackson writes: > Hi. Thanks for the (re)-review. > > Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new > -runasid option"): >> Ian Jackson writes: >> > +case QEMU_OPTION_runasid: >> > +errno =

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-11-06 Thread Ian Jackson
Hi. Thanks for the (re)-review. Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Ian Jackson writes: > > +case QEMU_OPTION_runasid: > > +errno = 0; > > +lv = strtoul(optarg, , 0); /* can't

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-11-06 Thread Markus Armbruster
Sorry for the slow response. Ian Jackson writes: > This allows the caller to specify a uid and gid to use, even if there > is no corresponding password entry. This will be useful in certain > Xen configurations. > > Signed-off-by: Ian Jackson

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-11 Thread Ian Jackson
Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Actually, a numeric UID without group name or ID could be made to work > just fine as long as it maps to a user name. The use case may not be > worth the bother, though. In libxl's use case, it

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-10 Thread Ian Jackson
Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Actually, a numeric UID without group name or ID could be made to work > just fine as long as it maps to a user name. The use case may not be > worth the bother, though. In libxl's use case, it

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-10 Thread Markus Armbruster
Ian Jackson writes: > Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new > -runasid option"): >> The last thing the QEMU command line needs is more exotic options. Are >> you sure we need a new one here? Can we make existing -runas serve?

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-09 Thread Ian Jackson
(resending, more competently this time) Daniel P. Berrange writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Just use getpwuid() to get the "struct passwd *", then change_process_uid() > doesn't need any changes at all AFAICT. See my comments in the commit

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-09 Thread Ian Jackson
Daniel P. Berrange writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Just use getpwuid() to get the "struct passwd *", then change_process_uid() > doesn't need any changes at all AFAICT. See my comments in the commit message. There may be multiple passwd entries

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-09 Thread Daniel P. Berrange
On Mon, Oct 09, 2017 at 04:05:10PM +0100, Ian Jackson wrote: > Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new > -runasid option"): > > The last thing the QEMU command line needs is more exotic options. Are > > you sure we need a new one here? Can we make existing

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-09 Thread Ian Jackson
(resending to right address for xen-devel) Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > The last thing the QEMU command line needs is more exotic options. Are > you sure we need a new one here? Can we make existing -runas serve? >

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-09 Thread Ian Jackson
Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > The last thing the QEMU command line needs is more exotic options. Are > you sure we need a new one here? Can we make existing -runas serve? > Precedence: Coreutils[*]. Pseudo-code: > > if

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-08 Thread Markus Armbruster
Ian Jackson writes: > This allows the caller to specify a uid and gid to use, even if there > is no corresponding password entry. This will be useful in certain > Xen configurations. > > Signed-off-by: Ian Jackson [...] > diff --git

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Ian Jackson
(resending to fix xen-devel CC) Peter Maydell writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > On 4 October 2017 at 17:18, Ian Jackson wrote: > > static void change_process_uid(void) > > { > > -if (user_pwd) { > > -if

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Ian Jackson
Peter Maydell writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > On 4 October 2017 at 17:18, Ian Jackson wrote: > > static void change_process_uid(void) > > { > > -if (user_pwd) { > > -if (setgid(user_pwd->pw_gid) < 0) { > >

Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Peter Maydell
On 4 October 2017 at 17:18, Ian Jackson wrote: > This allows the caller to specify a uid and gid to use, even if there > is no corresponding password entry. This will be useful in certain > Xen configurations. > > Signed-off-by: Ian Jackson