PolicyKit 0.8

David Zeuthen david at fubar.dk
Mon Apr 21 11:28:07 PDT 2008


On Fri, 2008-04-18 at 02:12 -0400, Joe Marcus Clarke wrote:
> On Wed, 2008-04-16 at 23:39 -0400, David Zeuthen wrote:
> I have ported PK 0.8 to FreeBSD, and I updated the patchset.  The URL is
> the same, but the patches should all apply to git master.  Note: I
> reverted the Solaris clearenv patch in favor of my original portability
> patch.  I also fixed a Solaris-related typo in configure.in.
> 
> http://www.marcuscom.com/downloads/pk/

Comments about the PolicyKit patch.  A lot of the patch is about
creating polkit_sysdeps_* functions that emulate certain GNU-isms used
from the GNU C library. The idea of polkit_sysdeps_* is to be exported
symbols that aren't in any C library; for example we want to use
polkit_sysdeps_get_exe_for_pid() is other places too.

So ideally the way I'd like to see this being done is if a platform
doesn't have e.g. strndup() then we define that function somewhere.
Which means we wouldn't need to have a lot of #ifdef's in the call
sites. So perhaps we should have kit-sysdeps-private.h with things like

 #ifndef HAVE_STRNDUP
 char *strndup(const char *s, size_t n);
 #endif

and we'd have kit.h include this file and then have a have a file
kit-sysdeps-private.c with the implementation in it. Does that make
sense?

I don't know enough about kqueue stuff to review it; but more about that
in the reply to your other mail.

     David




More information about the hal mailing list