diff --git a/src/launch/policy.c b/src/launch/policy.c index 803336fc..97f1bf1a 100644 --- a/src/launch/policy.c +++ b/src/launch/policy.c @@ -396,11 +396,13 @@ static int policy_import_own(Policy *policy, ConfigNode *cnode) { } else if (cnode->parent->policy.context == CONFIG_POLICY_AT_CONSOLE) { c_list_link_tail(&policy->at_console_entries.own_list, &record->link); } else if (cnode->parent->policy.context == CONFIG_POLICY_GROUP) { - r = policy_at_gid(policy, &node, cnode->parent->policy.id); - if (r) - return error_trace(r); + if (cnode->parent->policy.id != (uint32_t)-1) { + r = policy_at_gid(policy, &node, cnode->parent->policy.id); + if (r) + return error_trace(r); - c_list_link_tail(&node->entries.own_list, &record->link); + c_list_link_tail(&node->entries.own_list, &record->link); + } } else { c_list_link_tail(&policy->default_entries.own_list, &record->link); }