OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
957 stars 174 forks source link

"JobPrivateAccess all" does not work #990

Open miztake opened 2 weeks ago

miztake commented 2 weeks ago

According to man 5 cupsd.conf, "all" can be specified for JobPrivateAccess.


DIRECTIVES VALID WITHIN POLICY SECTIONS The following directives may be placed inside Policy sections in the cupsd.conf file:

   JobPrivateAccess all

   JobPrivateAccess default

   JobPrivateAccess {user|@group|@ACL|@OWNER|@SYSTEM} ...

Even if "JobPrivateAccess all" is set, the result of lpstat is unknown.

~]# lpstat -o
devnull01-9             unknown              0   Fri May 10 15:11:23 2024
devnull03-13            unknown              0   Fri May 10 15:23:38 2024
~]# 

When "JobPrivateAccess all" is set, it seems to allow user named "all". In fact, when a user named "all" runs lpstat, it displays correctly.

~]$ whoami
all
~]$ lpstat -o
devnull01-9             user01               0   Fri May 10 15:11:23 2024
devnull03-13            user03               0   Fri May 10 15:23:38 2024
~]$

When "JobPrivateAccess all" is set, it should be allowed for all users.

miztake commented 2 weeks ago

According to scheduler/conf.c, not only JobPrivateAccess, but also JobPrivateValues, SubscriptionPrivateAccess, and SubscriptionPrivateValues ​​do not seem to support "all".

https://github.com/OpenPrinting/cups/blob/master/scheduler/conf.c#L4135-L4195