|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option
(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 <ian.jackson@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |