Possible PolicyKit issues

David Zeuthen david at fubar.dk
Wed Apr 30 13:08:40 PDT 2008


On Wed, 2008-04-30 at 13:52 -0400, Joe Marcus Clarke wrote:
> David Zeuthen wrote:
> > On Wed, 2008-04-30 at 13:44 -0400, Joe Marcus Clarke wrote:
> >> Correct.  I think it does read all the data, then the stream puts out 
> >> EOF which causes the helper to be called ad infinitum.
> > 
> > I see. Mmm.. In that case, polkit_grant_io_func() can detect EOF
> > (getline() returning -1) and then call the remove_watch() method
> > supplied by polkit-gnome-manager.c right?
> 
> It could, but what's the difference between that and returning FALSE in 
> the caller?  Both would result in the watch being removed.  And since 
> the io_func reads the entire amount of data (until EOF) that shouldn't 
> be a problem.

The PAM conversation happens over that fd and for some cases I don't
think we read all the data at once. So there may be multiple calls to
polkit_grant_io_func(). As such, returning FALSE won't work for all
cases.

     David




More information about the hal mailing list