Bug 55860 - UCR-CUPS-Config will set to default after update
UCR-CUPS-Config will set to default after update
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-3-errata
Assigned To: Mark Lindhout (Extern)
Erik Damrose
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-06 16:51 CET by Mirac Erdemiroglu
Modified: 2023-03-15 14:14 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.114
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023030221000793
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirac Erdemiroglu univentionstaff 2023-03-06 16:51:58 CET
UCS 5.0-3

the cups/policy/default/* UCR variables can be used to set access permissions for specific CUPS operations.
We have to set a few values there that differ from the default so that printing from the iPads works.

But: The postinst script of the package "univention-printserver", which is executed after each update of the package, always resets these variables!

root@dc000:/var/lib/dpkg/info# cat univention-printserver.postinst

# cups default policies

univention-config-registry set \

        cups/policy/default/JobPrivateAccess="default" \

        cups/policy/default/JobPrivateValues="none" \

        cups/policy/default/SubscriptionPrivateAccess="default" \

        cups/policy/default/SubscriptionPrivateValues="default" \

        cups/policy/default/limit/1="Create-Job Print-Job Print-URI Validate-Job" \

        cups/policy/default/limit/1/Order="deny,allow" \

        cups/policy/default/limit/2="Send-Document Send-URI Cancel-Job Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Authenticate-Job CUPS-Get-Document" \

        cups/policy/default/limit/2/Require="user @OWNER @SYSTEM" \

        cups/policy/default/limit/2/Order="deny,allow" \

        cups/policy/default/limit/3="Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default" \

        cups/policy/default/limit/3/AuthType="Default" \

        cups/policy/default/limit/3/Require="user @SYSTEM" \

        cups/policy/default/limit/3/Order="deny,allow"


Idea from the customer:
In my opinion, the UCR commands should use "?" instead of "=" so that the (default) values are only set if the UCR variables do not yet exist.
Comment 1 Mark Lindhout (Extern) univentionstaff 2023-03-14 09:42:54 CET
Values are now no longer overwritten if set.
Comment 2 Mark Lindhout (Extern) univentionstaff 2023-03-14 09:46:02 CET
Values are now no longer overwritten if set.

Commits:
c237e38e27 Bug #55860: Added fix version for univention-printserver YAML.
60590eecbb Bug #55860: Added changelog and YAML file.
c5d2f26c83 Bug #55860: CUPS defaults are no longer overwritten if the value already exists.
Comment 3 Erik Damrose univentionstaff 2023-03-15 09:55:11 CET
OK: univention-printserver 13.0.8-2A~5.0.0.202303140937
OK: Fix: UCRvs are not overwritten anymore on package update.
OK: yaml, i adjusted the indentation slightly

Verified