qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5.1 7/8] os-posix: Provide new -runas <uid>:<gi


From: Ian Jackson
Subject: Re: [Qemu-devel] [PATCH v5.1 7/8] os-posix: Provide new -runas <uid>:<gid> facility
Date: Tue, 24 Oct 2017 19:19:10 +0100

Anthony PERARD writes ("Re: [PATCH v5.1 7/8] os-posix: Provide new -runas 
<uid>:<gid> facility"):
> On Fri, Oct 20, 2017 at 02:38:21PM +0100, Ian Jackson wrote:
> > +static bool os_parse_runas_uid_gid(const char *optarg)
...
> > +    errno = 0;
> > +    lv = strtoul(optarg, &ep, 0); /* can't qemu_strtoul, want *ep==':' */
> 
> Should strtoul base be 10? If that matter.

If someone wants to write uids in hex then I don't see a reason to
stop them...

> > -        if (!user_pwd) {
> > -            fprintf(stderr, "User \"%s\" doesn't exist\n", optarg);
> > +        if (!user_pwd && !os_parse_runas_uid_gid(optarg)) {
> > +            fprintf(stderr,
> > +                    "User \"%s\" doesn't exist (and is not <uid>.<gid>)\n",
> 
> The error message have not been update, I think it should be <uid>:<gid>

Oops.

> With the error message fix:
> Reviewed-by: Anthony PERARD <address@hidden>

Thanks,
Ian.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]