OK florian@

On Sat, Aug 04, 2018 at 12:21:46PM +0100, Ricardo Mestre wrote:
> Hi,
> 
> And here's another one that also removes cpath promise from vmd(8)
> 
> OK?
> 
> Index: control.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/control.c,v
> retrieving revision 1.28
> diff -u -p -u -r1.28 control.c
> --- control.c 13 Jul 2018 08:42:49 -0000      1.28
> +++ control.c 3 Aug 2018 06:56:29 -0000
> @@ -67,12 +67,11 @@ control_run(struct privsep *ps, struct p
>       /*
>        * pledge in the control process:
>        * stdio - for malloc and basic I/O including events.
> -      * cpath - for managing the control socket.
>        * unix - for the control socket.
>        * recvfd - for the proc fd exchange.
>        * sendfd - for send and receive.
>        */
> -     if (pledge("stdio cpath unix recvfd sendfd", NULL) == -1)
> +     if (pledge("stdio unix recvfd sendfd", NULL) == -1)
>               fatal("pledge");
>  }
>  
> @@ -203,15 +202,6 @@ control_listen(struct control_sock *cs)
>       evtimer_set(&cs->cs_evt, control_accept, cs);
>  
>       return (0);
> -}
> -
> -void
> -control_cleanup(struct control_sock *cs)
> -{
> -     if (cs->cs_name == NULL)
> -             return;
> -     event_del(&cs->cs_ev);
> -     event_del(&cs->cs_evt);
>  }
>  
>  /* ARGSUSED */
> Index: proc.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/proc.c,v
> retrieving revision 1.16
> diff -u -p -u -r1.16 proc.c
> --- proc.c    4 Nov 2017 07:40:31 -0000       1.16
> +++ proc.c    3 Aug 2018 06:56:29 -0000
> @@ -475,9 +475,6 @@ proc_shutdown(struct privsep_proc *p)
>  {
>       struct privsep  *ps = p->p_ps;
>  
> -     if (p->p_id == PROC_CONTROL && ps)
> -             control_cleanup(&ps->ps_csock);
> -
>       if (p->p_shutdown != NULL)
>               (*p->p_shutdown)();
>  
> Index: proc.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/proc.h,v
> retrieving revision 1.14
> diff -u -p -u -r1.14 proc.h
> --- proc.h    15 Jul 2018 14:36:54 -0000      1.14
> +++ proc.h    3 Aug 2018 06:56:29 -0000
> @@ -69,11 +69,6 @@ struct control_sock {
>  };
>  TAILQ_HEAD(control_socks, control_sock);
>  
> -struct {
> -     struct event     ev;
> -     int              fd;
> -} control_state;
> -
>  struct ctl_conn {
>       TAILQ_ENTRY(ctl_conn)    entry;
>       uint8_t                  flags;
> @@ -197,7 +192,6 @@ void       control(struct privsep *, struct p
>  int   control_init(struct privsep *, struct control_sock *);
>  int   control_reset(struct control_sock *);
>  int   control_listen(struct control_sock *);
> -void  control_cleanup(struct control_sock *);
>  
>  /* log.c */
>  void log_init(int, int);
> 

-- 
I'm not entirely sure you are real.

Reply via email to