On Oct 5, 2016, at 9:43 AM, Jakub Hrozek <jhrozek(a)redhat.com>
wrote:
On Wed, Oct 05, 2016 at 07:42:23AM -0600, Philip Prindeville wrote:
> On Oct 5, 2016, at 5:45 AM, Michal Židek <mzidek(a)redhat.com> wrote:
>>
>> ACK to the code from Philip. I amended the commit
>> message to meet our style.
>>
>> I would like to push this together with at least some
>> sanity tests. See the second patch. I am looking for
>> someone from SSSD developers to review the tests.
>>
>> Michal
>>
>> PS: Btw. Philip, I am interested for what project are you
>> using ding-libs.
>>
>
>
> The project was an SSSD provider (proxy) for Tacacs+ accounting, authentication, and
authorization.
Wow, I'm intrigued and I think all of us want to help!
Is that an in-house project or do you plan on open sourcing it? If the
latter, I wonder if we could help with review, writing more docs or just
about anything?
Sure, we were planning on upstreaming it.
For the Tacacs+ part, I had used an event-driven dispatcher (libevent), but the DBus
listener ran in a separate thread…
I had wanted to make everything be event-driven, including servicing the arrival of DBus
requests from SSSD, because then you could handle request/reply pairs asynchronously for
Tacacs, which then enables you to let Tacacs+ reuse connections to servers if they’re
already up, or do multiplexing (i.e. having multiple requests on the fly, and having
responses come back out of order, etc).
That part I haven’t figured out yet… how to integrate DBus with libevent. There are a
couple of posting online about how to do this, but nothing that looks very elegant. See:
https://lists.freedesktop.org/archives/dbus/2016-August/017005.html
<
https://lists.freedesktop.org/archives/dbus/2016-August/017005.html>
The one example I saw
(
http://stackoverflow.com/questions/9378593/dbuswatch-and-dbustimeout-exam...) struck me
as having an unfortunate race condition. I looked at that and thought, “there must be a
better way”.
So once I clear that hurdle, and the changes I had to make to pam_tacplus’s libtac library
get accepted upstream (I’m about a third of the way done) then I can finish the rewrite
(sans the ugly libevent/pthread mix that it currently has) and upstream the entire thing.
I’ve not looking into the GDBus interface, just the old glib-dbus.
Any advice on how to handle that particular problem would be especially helpful.
Thanks,
-Philip