From: Daniel Wagner <daniel.wag...@bmw-carit.de> Hi,
This version containts several small bug fixes. Though it also unreviels a nasty use after free bug in the session core. Note this bug is not introduced by this series. Changes v1: - fixed shutdown sequence (double free) - fixed memory leaks - handle loading/parsing errors v0: - initial version cheers, daniel original cover letter: here is the initial series to allow UID matching on policy files. The first part of the series are preparation patches and some small cleanups. I need first to split the ownership of the connman_session_policy data from the policy_hash table. In the end we can rename the policy_hash to file_hash. That means we have one hash for the sessions and one for the files. The ownership is transfered to a new policy list. I think overall that should make the code also better readable. With introducing a unit test for the UID support the second part starts. A few patches are needed to add the cb_data helpers and consequently fixing up the some parts which can make use of it. The very last patch gives you finally the UID matching. There are still a few broken in this version, so this is not ready to be applied. Daniel Wagner (20): session_policy_local: Refactor SELinux context parser session: Do not fail when creating default policy configuration session_policy_local: Do not handle small allocation session_policy_local: Track policy data structure in a separate list session_policy_local: Print warning if loading of policy fails session_policy_local: Use policy_hash only to track the policy files session_policy_local: Load policy from file session_policy_local: Rename policy_hash to file_hash session_policy_local: Rename ident to filename session_policy_local: Split LSM context ident from filename test-session: Add unit test for session_policy_local connman: Add callback helpers session: Add "_t" postfix to callback typedef session_policy_local: Use callback helpers dbus: Use callback helpers dbus: Add connman_dbus_get_connnection_unix_user() session_policy_local: Retrieve UID from session user session_policy_local: Add some more debug infos session_policy_local: Do not free policy on load error session: Reorder shutdown sequence include/dbus.h | 16 +- include/session.h | 10 +- include/types.h | 19 +++ plugins/session_policy_local.c | 372 +++++++++++++++++++++++++++-------------- src/dbus.c | 112 ++++++++++--- src/main.c | 2 +- src/session.c | 29 ++-- unit/test-session.c | 156 +++++++++++++++++ 8 files changed, 537 insertions(+), 179 deletions(-) -- 1.8.1.3.566.gaa39828 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman