scheduler: Added extra check for administrative tasks from Snaps
Let the scheduler check whether if an administrative request
(create/modify print queue, delete someone else's jobs, ...) from a
client is from a fully confined Snap and then only grant access if the
client Snap plugs "cups-control". If client Snap plugs "cups" instead
it can only print, check status, or remove the caller's own jobs. For
requests from classically confined Snaps or unsnapped clients access
is always granted.
This is to protect arbitrary Snaps from the Snap Store to do
administrative CUPS tasks. The Snap Store allows automatic connection
only of the "cups" interface, not of the cups-control interface.
This facility is optional, to be activated by configure options,
"--enable-snapped-clients" for unsnapped CUPS and
"--enable-snapped-cupsd" when CUPS itself is also in a Snap. The
former accesses the needed information about the client using
libsnapd-glib (which cannot be used from within a Snap) and latter
uses the "snapctl" utility (which only works from within a Snap). In
both cases also libapparmor is needed to determine whether the client
is actually a Snap.