Hi Patrik,
On 05/15/2013 04:57 PM, Patrik Flykt wrote:
+static void recheck_sessions(void)
+{
+ GHashTableIter iter;
+ gpointer value, key;
+ struct policy_group *group = NULL;
+
+ g_hash_table_iter_init(&iter, session_hash);
+ while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
+ struct policy_config *policy = value;
+
+ if (policy->group != NULL)
+ continue;
+
+ group = g_hash_table_lookup(selinux_hash, policy->selinux);
+ if (group != NULL)
+ set_policy(policy, group);
+
+ update_session(policy);
If group == NULL after the hash table lookup, do we need to
update_session(policy) even though nothing has changed or is it an
error?
Good catch. recheck_session() tries to find a configuration for a
session which has no configuration attached yet. Therefore, if no
configuration is found, nothing has to be done.
cheers,
daniel
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman