From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xensource.com
Cc: Ian.Jackson@eu.citrix.com, wei.liu2@citrix.com
Subject: Re: [PATCH v8] run QEMU as non-root
Date: Fri, 2 Oct 2015 13:17:11 +0100 [thread overview]
Message-ID: <1443788231.11707.84.camel@citrix.com> (raw)
In-Reply-To: <1443627946-4716-1-git-send-email-stefano.stabellini@eu.citrix.com>
On Wed, 2015-09-30 at 16:45 +0100, Stefano Stabellini wrote:
> QEMU is going to setuid and setgid to the user ID and the group ID of
> the specified user, soon after initialization, before starting to deal
> with any guest IO.
Can you confirm that QEMU will bail if the user given via -runas doesn't
exist. IOW if the user gives b_info->device_model_user != NULL we will
correctly end up bailing if that specific user doesn't exist rather than
running as root?
If that is the case then:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Wasn't there some code to plumb this into xl at one point? Did that get
dropped along the way?
> [...]
> + user = NULL;
> + LOG(WARN, "Could not find user %s, starting QEMU as root",
> + LIBXL_QEMU_USER_SHARED);
> +
> +end_search:
> + if (user != NULL && strcmp(user, "root")) {
This strcmp struck me as odd given the user = NULL just above, but this is
for the case where the user explicitly requested root, right?
> + flexarray_append(dm_args, "-runas");
> + flexarray_append(dm_args, user);
> + }
next prev parent reply other threads:[~2015-10-02 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 15:45 [PATCH v8] run QEMU as non-root Stefano Stabellini
2015-10-02 12:17 ` Ian Campbell [this message]
2015-10-05 15:53 ` Stefano Stabellini
2015-10-05 16:20 ` Ian Campbell
2015-10-06 13:13 ` Stefano Stabellini
2015-10-06 13:30 ` Ian Campbell
2015-10-06 15:29 ` Jim Fehlig
2015-10-07 11:15 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443788231.11707.84.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.