[cups-devel] [UNKN] STR #4659: "Limit All" must be on its own otherwise clients like "lpstat -p" hang up

Johannes Meixner noreply at cups.org
Wed Jul 1 05:21:01 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I use CUPS 2.0.3 (without any patches)
and the following in cupsd.conf
(the "Limit" line is shown wrapped here):
- -------------------------------------------------------
<Policy allowallforanybody>
  JobPrivateAccess all
  JobPrivateValues none
  SubscriptionPrivateAccess all
  SubscriptionPrivateValues none
  <Limit All Validate-Job Cancel-Jobs Cancel-My-Jobs
 Close-Job CUPS-Get-Document>
    Order deny,allow
    Allow from all
  </Limit>
</Policy>
DefaultPolicy allowallforanybody
- -------------------------------------------------------

In this case clients like "lpstat -p" hang up
and need to be aborted by [Ctrl]+[C]:
- -------------------------------------------------------
# echo 'begin test lpstat' >>/var/log/cups/error_log
   
# lpstat -p
^C
  
# echo 'end test lpstat' >>/var/log/cups/error_log
- -------------------------------------------------------

Attached /var/log/cups/error_log with LogLevel debug2.


When I use a separated "Limit All" it works:
- -------------------------------------------------------
<Policy allowallforanybody>
  JobPrivateAccess all
  JobPrivateValues none
  SubscriptionPrivateAccess all
  SubscriptionPrivateValues none
  <Limit Validate-Job Cancel-Jobs Cancel-My-Jobs Close-Job
CUPS-Get-Document>
    Order deny,allow
    Allow from all
  </Limit>
  <Limit All>
    Order deny,allow
    Allow from all
  </Limit>
</Policy>
DefaultPolicy allowallforanybody
- -------------------------------------------------------

I think it is a bug when because of an incorrectly
specified policy cupsd clients like "lpstat -p" hang up.


A side note (minor issue):

I need the
<Limit Validate-Job Cancel-Jobs Cancel-My-Jobs Close-Job CUPS-Get-Document>
because without it cupsd shows this warnings in error_log
(long lines shown wrapped here):
- --------------------------------------------------------------------
W ... No limit for Validate-Job defined in policy
 allowallforanybody and no suitable template found.
W ... No limit for Cancel-Jobs defined in policy
 allowallforanybody and no suitable template found.
W ... No limit for Cancel-My-Jobs defined in policy
 allowallforanybody and no suitable template found.
W ... No limit for Close-Job defined in  policy
 allowallforanybody and no suitable template found.
W ... No limit for CUPS-Get-Document defined in policy
 allowallforanybody and no suitable template found.
- --------------------------------------------------------------------

I think "Limit All" should include Validate-Job Cancel-Jobs
Cancel-My-Jobs Close-Job CUPS-Get-Document so that those
do not need a separated Limit section.

Link: https://www.cups.org/str.php?L4659
Version: 2.0.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVk9ssAAoJENujp6sI12IjD3oQALQpjOw+QfkLAszz+uXkqiJ/
sTb9s017RY3v7CZFk1xlf0lAsfzr/DhO01SArixVCzxoiiBbFcvEr46WkJytmH0u
Tn+5xHI482/0CfWse/sB1V3VBKUzmYr8MXNkz8gi5NYWLLmAr2pUtfQ/PKrUjwXn
r3P+axIrhG5U6Q5XSvyVXnxlb1W9sGufCNSzsPXTGlcawJhTU+eOtGCR0AYaWpuc
08nrkp2nkpEhsaK1KX8oA4HisCOPOIjNUCDPErXJVi3i3/mnzOLMtAB3aN9YM94t
EwRcYTKl7D8a0U0wHmtHLw8TfjB/M7P+AoFUosc0Tvns7ij9kjQeyeULrDiQtc5z
E4KtKIp8MBvR/VBEBzbjZiQESZcAeDPIh5CJybZ/yUVAn7LU+NFS61pY2+BXVFc4
ruYkiudRHr5/rTznoxKv4yG0U61ZJ8M29s34FIJwkiTQ1sJJCdI1hgDyESVoPJt7
4agVwp/vnSSsPcnTslolMUzYaApervDuHmPZypkmHTOA4/lk4mW0MsLS0rkeMjG/
FZSQL9u1SXYKDw9NmoFn/NtBsHC3kT4uu743vupsoG7r2W0m4qp07qG9IzV1io/r
kiiqL8vbp7xoQlg0hxgtRax0yQwgezV/wH/PLi33GPSQz9ed/9Fvl9My/zZUBbYy
j9E9haWC+GY5P7uAdFkp
=zLN3
-----END PGP SIGNATURE-----




More information about the cups mailing list