PolicyKit 0.8
Joe Marcus Clarke
marcus at freebsd.org
Mon Apr 21 11:34:03 PDT 2008
David Zeuthen wrote:
> 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?
Well, Solaris added the same functions, so I suppose I could just extend
their #ifdefs for FreeBSD support. That would leverage the code that
has already been committed.
What I was trying to avoid is a lot of #ifdefs. The #ifdefs were
centralized in the sysdeps code. But I can see why you would want to
privatize those functions. That said, I wanted to add it to kit, but
kit is really internal, and I couldn't include kit headers cleanly in
the tools code.
>
> I don't know enough about kqueue stuff to review it; but more about that
> in the reply to your other mail.
I followed the inotify flow, and have used similar code in other
projects to do config file monitoring.
Joe
>
> David
>
>
>
--
Joe Marcus Clarke
FreeBSD GNOME Team :: gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome
More information about the hal
mailing list