Hi all,
I've been cleaning up Arun's code for a couple of days and I'd like to
discuss it a little bit.
Please checkout the latest version at:
git://git.engineering.redhat.com/users/pbrezina/sssd.git
branch: sudo-rebased
branch: sudo-arun (Arun's original)
First of all, I would like to point out I don't actually believe Arun
has ever tried it's functionality because the code contains some errors
since commit from 08/10 (11 commits ago).
You can see I've rewritten the coding style of
sbus_dbus_messages_helpers.c and sudo plugin. Removed some warnings and
the errors mentioned above. I've emailed Arun two days ago, asking him
to rewrite coding style of sudo responder, but he hasn't answered yet.
-------------------
SUDO plugin API documentation:
http://www.gratisoft.us/sudo/man/1.8.2/sudo_plugin.man.html
1. I've added some questions of mine marked with TODO to sss_sudoplugin.c.
2. He's using sometimes fprintf/printf. I believe we should use only
printf/conversation function given by sudo in policy_open().
3. While creating hash tables of settings and envirement, he's
converting all booleans to string (which currently causes 'discard
const' warnings). I'm not very familiar how these hash_tables are
transferred via dbus but I believe it can be transferred as integer?
4. It looks to me like he's sending to responder settings and user_env
which are given by sudo in polici_open(). I think we should pass
settings and user_info.
5. To communicate with responder, he uses (struct
sbus_interface)->methods instead of struct sss_cmd_table.
6. There is warning about not initialized init_session field of
policy_plugin struct. I have sudo Sudo version 1.8.1p2...the plugin api
version is still 1/1. I'm not sure if they updated the api or not.
7. There's still an error which blocks compilation: libtool:
link: cannot find the library `libsss_util.la' or unhandled argument
`libsss_util.la'
I don't know what to do with it, makefile looks ok to me.