[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option |
Date: |
Mon, 9 Oct 2017 16:24:57 +0100 |
User-agent: |
Mutt/1.9.0 (2017-09-02) |
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 -runas serve?
> > Precedence: Coreutils[*]. Pseudo-code:
> >
> > if argument is a decimal number starting with '+':
> > user ID
> > else if argument is a valid user name:
> > user name
> > else if argument is a valid user ID:
> > user ID
> > else:
> > error
>
> I can do this. So -runas <uid>.<gid> then. I don't think it makes
> sense to try to -runas <uid> because: you wouldn't have a username
> to pass to initgroups: not calling initgroups would be a bear trap;
> and otherwise we wouldn't know what gid to use.
Just use getpwuid() to get the "struct passwd *", then change_process_uid()
doesn't need any changes at all AFAICT.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [Qemu-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 1/8] xen: link against xentoolcore, Ian Jackson, 2017/10/04
- [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Ian Jackson, 2017/10/04
- Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Ross Lagerwall, 2017/10/06
- Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Peter Maydell, 2017/10/06
- Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Markus Armbruster, 2017/10/09
- Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Markus Armbruster, 2017/10/10
- Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option, Ian Jackson, 2017/10/10
[Qemu-devel] [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all, Ian Jackson, 2017/10/04