Skip to content
  • Simon McVittie's avatar
    bus: When failing to reload client policy, continue iteration · 02b913f3
    Simon McVittie authored
    If we have a large number of connections to the bus, and we fail to
    reload the policy for one of them (perhaps because its uid no longer
    exists in the system user database), previously we would crash, which
    is obviously unintended. After the previous commit, we would stop
    iteration through the list of client connections, which doesn't seem
    great either: one bad connection shouldn't prevent us from reloading
    the rest of our state.
    
    Instead, let's distinguish between new connections (where we want
    failure to establish a security policy to be fatal), and pre-existing
    connections (where the current security policy is presumably good
    enough to keep using if we have nothing better). If we're unable to
    reload the policy for a pre-existing connection, log a warning and
    carry on iterating.
    
    Helps: #343
    
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    02b913f3