[libvirt] [PATCH 3/6] Support changing UNIX socket owner in virNetSocketNewListenUNIX

Jiri Denemark jdenemar at redhat.com
Mon Aug 15 12:33:18 UTC 2011


On Mon, Aug 15, 2011 at 17:38:47 +0800, Daniel Veillard wrote:
> On Mon, Aug 15, 2011 at 09:58:13AM +0200, Jiri Denemark wrote:
> > This patch allows owner's UID to be changed as well.
> > ---
> >  src/rpc/virnetserverservice.c |    2 +-
> >  src/rpc/virnetsocket.c        |    7 ++++---
> >  src/rpc/virnetsocket.h        |    1 +
> >  tests/virnetsockettest.c      |    4 ++--
> >  4 files changed, 8 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
> > index e63603f..9f82a8d 100644
> > --- a/src/rpc/virnetserverservice.c
> > +++ b/src/rpc/virnetserverservice.c
> > @@ -182,7 +182,7 @@ virNetServerServicePtr virNetServerServiceNewUNIX(const char *path,
> >  
> >      if (virNetSocketNewListenUNIX(path,
> >                                    mask,
> > -                                  grp,
> > +                                  -1, grp,
> 
>   Only comment would be that if we started with one line per arg, the
> patch should probably keep that (but I don't like this much so ...)

Yeah, I was thinking about uid and gid to be so closely related that it made
sense to put them on a single line. I separated them for consistency.

Jirka




More information about the libvir-list mailing list