Peter Maydell writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > On 4 October 2017 at 17:18, Ian Jackson <ian.jack...@eu.citrix.com> 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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel