Skip to content
  • Philip Withnall's avatar
    daemon: Monitor the extension interfaces directories for changes · fa6a9eb5
    Philip Withnall authored
    The set of installed extension interfaces (in
    `/usr/share/accountsservice/interfaces`) can change while
    accountsservice is running, due to other packages being installed or
    removed.
    
    For example, it’s happened here:
    https://github.com/flatpak/flatpak/issues/5264#issuecomment-2066667101
    
    
    
    In order for the running state of the accountsservice daemon to match
    what its state would be if it had been restarted after the directory
    change, we need to monitor for changes and reload the set of extension
    interfaces.
    
    Do this in a straightforward way, by unregistering all of the extension
    interfaces and re-registering the new set on any change. This shouldn’t
    result in any visible churn on the bus because all the object
    registrations are local. This approach might have to change if the
    daemon were to start implementing `org.freedesktop.DBus.ObjectManager`,
    because it emits signals on interface changes. Let’s cross that bridge
    when we come to it though.
    
    Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
    
    Fixes: #125
    fa6a9eb5