Bryan Mason [Sat, 13 Mar 2021 01:18:31 +0000 (17:18 -0800)]
scheduler/cups.service.in: Use nss-user-lookup.target in "After="
Start cupsd after nss-user-lookup.target has been reached, instead of
listing every service that could provide username resolution (sssd,
ypbind, nslcd, etc.) to the "After=" line in the systemd unit file.
Michael R Sweet [Thu, 11 Mar 2021 16:31:03 +0000 (11:31 -0500)]
Address review by Till Kamppeter:
- Add mopria-certified and printer-wifi-xxx to list of Printer Description
attributes.
- Bump the PPD cache version to reflect the additional attributes we are adding.
- Update the documentation to note that DefaultPaperSize and ReadyPaperSizes
contain a list of PPD size names.
- Update urf-supported/URF values to include copies (CP), finishings (FN), and
print-quality (PQ) values.
Till Kamppeter [Wed, 10 Mar 2021 20:48:18 +0000 (21:48 +0100)]
scheduler: Admin task check: Grant access when client is our Snap
If the client Snap is the same as our cupsd is snapped in, grant
access without calling "snapctl". This makes the checks faster and
less resource-consuming if the inquiries are from the command line
tools or the included cups-browsed.
Till Kamppeter [Wed, 10 Mar 2021 20:48:18 +0000 (21:48 +0100)]
scheduler: Admin task check: Grant access when client is our Snap
If the client Snap is the same as our cupsd is snapped in, grant
access without calling "snapctl". This makes the checks faster and
less resource-consuming if the inquiries are from the command line
tools or the included cups-browsed.
Michael R Sweet [Sat, 6 Mar 2021 13:21:59 +0000 (08:21 -0500)]
Modernize cups-defaults configure sources.
Remove (long deprecated and not even working since 2.0) LPDConfigFile and
SMBConfigFile directives, along with "LPD" and "SMB" browsing protocols.
(LPD and SMB continue to work through their respective programs)
Till Kamppeter [Fri, 5 Mar 2021 14:50:14 +0000 (15:50 +0100)]
scheduler: Admin task check: Code improvements
Several improvements on the client Snap status check code after review
by the snapd developer who created the facility:
- Create snapctl argument arrays without dynamic variables
- Removed unneeded NULL checks from Glib-based memory freeing
- Do not check stderr output of snapd_client_run_snapctl2_sync(), not
needed in our case
- Use a switch statement for the treatment of the 4 possible snapctl results
In addition, do not use g_clear_object() for the GPtrArray plugs, it must
be g_ptr_array_unref() here.
removing the '=' between "--apparmor-label" and "AA_CONTEXT" to make
these two separate arguments and so avoid the need to concatenate the
strings in a buffer.
Did the same with the arguments for the
snapd_client_run_snapctl2_sync() function call.
Michael R Sweet [Thu, 4 Mar 2021 14:37:28 +0000 (09:37 -0500)]
Work on modernizing autoconf source files and the build system:
- Adopt non-deprecated autoconf macros, wrap shell "if" and "case" statements
with AS_IF and AS_CASE macros.
- Remove strings.h and bstring.h checks since they are not needed for modern
OS's.
- Rename cups-ssl.m4 to cups-tls.m4 (TLS support, not SSL support)
Till Kamppeter [Thu, 4 Mar 2021 14:27:59 +0000 (15:27 +0100)]
scheduler: Admin task check: Support to use libsnapd-glib instead of snapctl
When CUPS is running in a Snap the scheduler checks client Snaps
requesting administrative tasks calling the external executable
"snapctl" which does not scale well on many inquiries in parallel.
Therefore we use an equivalent library function of libsnapd-glib,
snapd_client_run_snapctl2_sync() instead, at least if the
libsnapd-glib is new enough to already contain this function, which we
check during build, by the ./configure script. If the function is not
available we automatically fall back to a build using the "snapctl"
utility.