On Thu, Dec 12, 2019 at 12:52:34PM +0100, Klemens Nanni wrote:
> On Thu, Dec 05, 2019 at 08:46:01PM +0100, Klemens Nanni wrote:
> > vm.conf(5) states it must be `owner user[:group]' or `owner group', not
> > specifying a value is undocumented and ought to be invalid syntax, yet
> > `owner' is treated as `owner root' which is the same as simply omitting
> > the owner line.
> > 
> > Diff below causes the following behaviour change:
> > 
> >     $ cat socket-owner.conf
> >     socket owner
> >     $ vmd -nf socket-owner.conf
> >     configuration OK
> >     $ ./obj/vmd -nf socket-owner.conf
> >     socket-owner.conf:1: syntax error
> > 
> >     $ cat vm-owner.conf
> >     vm v {
> >             disk /dev/null
> >             owner
> >     }
> >     $ vmd -nf vm-owner.conf          
> >     configuration OK
> >     $ ./obj/vmd -nf vm-owner.conf    
> >     vm-owner.conf:3: syntax error
> > 
> > Feedback? OK?
> Ping.
> 

Seems legit, OK denis@

Perhaps vm.conf(5) manual should tell that root:wheel is the default.

> 
> Index: parse.y
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/parse.y,v
> retrieving revision 1.53
> diff -u -p -r1.53 parse.y
> --- parse.y   12 Dec 2019 03:53:38 -0000      1.53
> +++ parse.y   12 Dec 2019 11:51:51 -0000
> @@ -553,11 +553,7 @@ instance_flags   : BOOT          { vmc.vmc_insflag
>               }
>               ;
>  
> -owner_id     : /* none */            {
> -                     $$.uid = 0;
> -                     $$.gid = -1;
> -             }
> -             | NUMBER                {
> +owner_id     : NUMBER                {
>                       $$.uid = $1;
>                       $$.gid = -1;
>               }
> 

Reply via email to