Extending polkit

polkit exports a number of extension points to replace/customize behavior of the polkit daemon. Note that all extensions run with super user privileges in the same process as the polkit daemon.

The polkit daemons loads extensions from the /usr/lib64/polkit-1/extensions directory. See the GIO Extension Point documentation for more information about the extension system used by polkit.

The following extension points are currently defined by polkit:

POLKIT_BACKEND_AUTHORITY_EXTENSION_POINT_NAME.  Allows replacing the Authority – the entity responsible for making authorization decisions. Implementations of this extension point must be derived from the PolkitBackendAuthority class. See the src/nullbackend/ directory in the polkit sources for an example.