- Now show better error messages when a driver interface program fails to
provide a PPD file (Issue #148)
- Added a workaround for Solaris in `httpAddrConnect2` (Issue #156)
+- Fixed an interaction between `--remote-admin` and `--remote-any` for the
+ `cupsctl` command (Issue #158)
- Now use a 60 second timeout for reading USB backchannel data (Issue #160)
- The USB backend now tries harder to find a serial number (Issue #170)
- Fixed `@IF(name)` handling in `cupsd.conf` (Apple #5918)
/*
* Administration utility API definitions for CUPS.
*
+ * Copyright © 2021 by OpenPrinting.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 2001-2007 by Easy Software Products.
*
cupsFilePuts(temp, " Order allow,deny\n");
if (remote_admin)
- cupsFilePrintf(temp, " Allow %s\n",
- remote_any > 0 ? "all" : "@LOCAL");
+ {
+ if (remote_any >= 0)
+ cupsFilePrintf(temp, " Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
+ else
+ cupsFilePrintf(temp, " Allow %s\n", old_remote_any > 0 ? "all" : "@LOCAL");
+ }
}
else if (in_conf_location && remote_admin >= 0)
{
cupsFilePuts(temp, " Order allow,deny\n");
if (remote_admin)
- cupsFilePrintf(temp, " Allow %s\n",
- remote_any > 0 ? "all" : "@LOCAL");
+ {
+ if (remote_any >= 0)
+ cupsFilePrintf(temp, " Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
+ else
+ cupsFilePrintf(temp, " Allow %s\n", old_remote_any > 0 ? "all" : "@LOCAL");
+ }
}
else if (in_log_location && remote_admin >= 0)
{
cupsFilePuts(temp, " Order allow,deny\n");
if (remote_admin)
- cupsFilePrintf(temp, " Allow %s\n",
- remote_any > 0 ? "all" : "@LOCAL");
+ {
+ if (remote_any >= 0)
+ cupsFilePrintf(temp, " Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
+ else
+ cupsFilePrintf(temp, " Allow %s\n", old_remote_any > 0 ? "all" : "@LOCAL");
+ }
}
else if (in_root_location &&
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
cupsFilePuts(temp, " Order allow,deny\n");
if (remote_admin > 0 || remote_any > 0 || share_printers > 0)
- cupsFilePrintf(temp, " Allow %s\n",
- remote_any > 0 ? "all" : "@LOCAL");
+ {
+ if (remote_any >= 0)
+ cupsFilePrintf(temp, " Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
+ else
+ cupsFilePrintf(temp, " Allow %s\n", old_remote_any > 0 ? "all" : "@LOCAL");
+ }
}
in_admin_location = 0;