[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: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option |
Date: |
Fri, 6 Oct 2017 15:24:09 +0100 |
Peter Maydell writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new
-runasid option"):
> On 4 October 2017 at 17:18, Ian Jackson <address@hidden> wrote:
> > static void change_process_uid(void)
> > {
> > - if (user_pwd) {
> > - if (setgid(user_pwd->pw_gid) < 0) {
> > + if (user_pwd || user_uid != (uid_t)-1) {
> > + if (setgid(user_pwd ? user_pwd->pw_gid : user_gid) < 0) {
> > fprintf(stderr, "Failed to setgid(%d)\n", user_pwd->pw_gid);
>
> If you're changing the gid we pass to setgid() I think you should
> also change the value we tell the user we tried to use in the
> error message, or it could be rather confusing.
Thanks for the review. Sorry about the mess here. I have fixed all
these problems.
Ian.
- [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,
Ian Jackson <=
- 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