Re: [PATCH v3 2/3] util: Introduce API's for Polkit text authentication

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

 



On Thu, Feb 25, 2016 at 11:47:03AM -0500, John Ferlan wrote:
> 
> 
> On 02/25/2016 09:25 AM, Daniel P. Berrange wrote:
> >>  int virPolkitCheckAuth(const char *actionid,
> >>                         pid_t pid,
> >>                         unsigned long long startTime,
> >> @@ -31,4 +33,7 @@ int virPolkitCheckAuth(const char *actionid,
> >>                         const char **details,
> >>                         bool allowInteraction);
> >>  
> >> +void virPolkitAgentDestroy(virCommandPtr cmd);
> >> +virCommandPtr virPolkitAgentCreate(void);
> > 
> > Rather than exposing use of virCommand in the API, I'd
> > suggest you create a
> > 
> > 
> >  typedef struct virPolkitAgent virPolkitAgent;
> >  typedef virPolkitAgent *virPolkitAgentPtr;
> 
> okidoke... Funny I had done it this way at some point, but when
> virCommandPtr was the only thing in the structure, I just opted to use
> virCommandPtr directly.  Anyway, the following is now defined:

It is just nice from the POV of isolating callers from impl detail. It
means we can switch to use direct DBus calls in the future without changing
any callers.


> 
> Forgot to note in my response to Martin that virpolkittest.c doesn't
> need a change here since virpolkit.h now includes vircommand.h.  Same of
> course for virsh.h.
> 
> Should I post a v4 of patches 2 & 3?

Yeah, it'd be good to send v4

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]