Comparar commits
428 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 58c3683023 | |||
| 303be29243 | |||
| 275af5ac7b | |||
| d821d89415 | |||
| 6579c998c4 | |||
| 1377fb858c | |||
| f9ee3b81e1 | |||
| 7e50a735a8 | |||
| 56b62a3b54 | |||
| 02773ede84 | |||
| ec9996719f | |||
| affaf0737f | |||
| 49fa4983f2 | |||
| 34be0e8038 | |||
| ce0d9679a4 | |||
| fad821594f | |||
| f8913c6d2c | |||
| a75c0e5961 | |||
| 5ee613bbc6 | |||
| 02c88e673e | |||
| 46a7b416ee | |||
| c61b78bd84 | |||
| 0ae5b012b2 | |||
| 15bba96c30 | |||
| bea3713442 | |||
| 5639a7b41c | |||
| 360e815a88 | |||
| c00282bb43 | |||
| 3a16bd9c9d | |||
| a7cdcd19b8 | |||
| 79424d8b9a | |||
| 5889fea75a | |||
| 16389be3ba | |||
| f97678f279 | |||
| 979804902c | |||
| b889560c05 | |||
| c9e9d0e810 | |||
| a5dd746bd0 | |||
| 6b33281c3e | |||
| 9554d4e748 | |||
| c0a47c1101 | |||
| 4cf66fef48 | |||
| b17b635a37 | |||
| 5d8b7d2665 | |||
| e4e371946b | |||
| 46d22fe908 | |||
| 9d4ae311cb | |||
| 2cf3a36a4e | |||
| fd2f0a7af7 | |||
| aa2a77dec8 | |||
| f0f4e0366c | |||
| 4279822fe4 | |||
| c6990c1ed5 | |||
| c31737b031 | |||
| 2d947886ad | |||
| 116c301f23 | |||
| b908d72cac | |||
| 2cb1fda9fe | |||
| 0728c89bcf | |||
| 123cfe0202 | |||
| d2123aee55 | |||
| ea4dcf9ff4 | |||
| b39dd420c6 | |||
| 5614f45d77 | |||
| 5229ea1a41 | |||
| b72c5bf2ed | |||
| befbadcef6 | |||
| 7b0a28e38f | |||
| e78c14f7ea | |||
| e146105294 | |||
| e37405ea8e | |||
| 5535551fd9 | |||
| 7f14a29798 | |||
| 4b16c717e5 | |||
| 240a27f93b | |||
| 75e1a17cad | |||
| 40cc612af4 | |||
| 9449dd948a | |||
| 2793a478d0 | |||
| 5b6caf71b8 | |||
| b10aebb1d3 | |||
| 9964a31a77 | |||
| 7c7347a346 | |||
| b337f966e8 | |||
| e9b2d701da | |||
| 91d748b919 | |||
| fa76bc3dc0 | |||
| 4f272af7bb | |||
| b770b18d0f | |||
| b0a1b229b3 | |||
| 997db40489 | |||
| 07911378c0 | |||
| 345e10ca71 | |||
| 41c0a57318 | |||
| 10f9350b7e | |||
| 03bc3ef4c2 | |||
| 7e7a13a32e | |||
| 60716f946c | |||
| e34d348250 | |||
| ada3421240 | |||
| a2a13afb48 | |||
| 259b03bc46 | |||
| a375587b8c | |||
| 0bc1a539f4 | |||
| 86390cbf57 | |||
| ced9dda826 | |||
| e9faaeef18 | |||
| c9dbe83d17 | |||
| e3b9d1f520 | |||
| 9f573d7be9 | |||
| 5cc8588e8c | |||
| f198f7e1e7 | |||
| 5e59cd062f | |||
| bee711586d | |||
| e7729c5a14 | |||
| 9eb416ee89 | |||
| b74b285e47 | |||
| 48dfd9a9a2 | |||
| 4174429905 | |||
| 13be9452da | |||
| a9357c9da4 | |||
| 44b3f16133 | |||
| c536b6c583 | |||
| 03d3907a33 | |||
| 76ae98d657 | |||
| 6d086e08e4 | |||
| 49f495c32e | |||
| f8a5ad9bde | |||
| 07cb72471a | |||
| b94f7488e8 | |||
| d2d605ff77 | |||
| 6eda776e8a | |||
| a621d151e7 | |||
| 3a1e6b10c5 | |||
| 7a0e5acde2 | |||
| c5755caf42 | |||
| e44bdfe7e3 | |||
| b2f85109da | |||
| fb963b8dd1 | |||
| fdc80a913f | |||
| 1a9743f9d7 | |||
| 534dfe8e94 | |||
| f1175a5a9d | |||
| db5424ea51 | |||
| cac6b6562c | |||
| b67c2dd202 | |||
| b3f6f8d202 | |||
| 4fac83763d | |||
| 2650d637dc | |||
| 070e33a4c9 | |||
| 1da024d1a7 | |||
| 6ad44eebc7 | |||
| 89c924d590 | |||
| e38ab40b22 | |||
| f2e8714723 | |||
| 8d7d268f61 | |||
| ca9e55c9b5 | |||
| b0fb2d75d3 | |||
| c9a0ff6208 | |||
| 296cd66b68 | |||
| 90c67342b6 | |||
| 956bb1274c | |||
| ae7225e576 | |||
| c838ec5a3b | |||
| 6df8f83339 | |||
| 76b7b95c9e | |||
| 058582b4b5 | |||
| 5c476bf970 | |||
| ef338d0c83 | |||
| 12b798a070 | |||
| 49b6c6af76 | |||
| de4966cb9b | |||
| 7f500d8988 | |||
| f34c1c99cd | |||
| 64447b5696 | |||
| 4466c8ca87 | |||
| 134d057955 | |||
| 827bf9ce2d | |||
| 3a6962171c | |||
| d4a895f856 | |||
| 75105fbdfb | |||
| d2f1a784c4 | |||
| 62825d3445 | |||
| a537431a13 | |||
| 35fc224370 | |||
| 2a75f21b6a | |||
| ac032efa3e | |||
| 08566de251 | |||
| f1dd3a3976 | |||
| 96a5df6235 | |||
| 65bebeac76 | |||
| 5cb94b289a | |||
| 98d88c8d47 | |||
| 0668b48c10 | |||
| 718ee2fff3 | |||
| 500fca270a | |||
| e1ba078bdc | |||
| 78ac829c63 | |||
| ceea93e3d8 | |||
| c907de064d | |||
| 30afb232cd | |||
| 0ebee56929 | |||
| 9a4e273486 | |||
| 163a773e5b | |||
| 7c4b136b4f | |||
| bb719eb39a | |||
| 53af7f2160 | |||
| f50db552c5 | |||
| 4cfbd5f897 | |||
| fe4e5d67c5 | |||
| 82c719981b | |||
| 4a36625117 | |||
| 9022d60bbd | |||
| f8d0ab6d14 | |||
| 4b17d76f2a | |||
| e1bb4a6e98 | |||
| 167e0655b7 | |||
| 42deee7eaf | |||
| b497414286 | |||
| 7536de1a4a | |||
| d2817c9f02 | |||
| 143286bced | |||
| 95633d6282 | |||
| 2a20b51245 | |||
| 0d7cb94a77 | |||
| 9c44e2cb72 | |||
| e1c797efc7 | |||
| 869c206051 | |||
| 798d6e2934 | |||
| ac3015ba1a | |||
| 105922ec6d | |||
| 442e03eff1 | |||
| efa72f6100 | |||
| 3fae3b337d | |||
| 657c5b5f91 | |||
| a2187a6342 | |||
| 57543d87b6 | |||
| abacc52be4 | |||
| 17acb46909 | |||
| cceb9291b0 | |||
| 1f3f503a2b | |||
| 875ef65a9e | |||
| 845913bd5d | |||
| 87f340512c | |||
| dc8364753b | |||
| 0b1399a2c1 | |||
| afd25c346a | |||
| 1636510491 | |||
| 5423798c61 | |||
| a740a8491b | |||
| 16b0b41131 | |||
| 4886d6747e | |||
| 42dc144c44 | |||
| a946858f0c | |||
| 3ae6282d0e | |||
| 3b6c3c8e9d | |||
| 40c808603a | |||
| 84e3828d7d | |||
| 30be6424f0 | |||
| 1fbd0cabfb | |||
| 9c0c89124b | |||
| 4888dff95c | |||
| b393bc25e2 | |||
| 45eb1e5efc | |||
| 8a984948f3 | |||
| 87e9bb5508 | |||
| 68d5f6b8a4 | |||
| 83bf1f7b59 | |||
| 887fbb5445 | |||
| c245abfeb8 | |||
| e8a1fa03d0 | |||
| 14fdcd7a14 | |||
| 454708a4b9 | |||
| 905010801a | |||
| fc1fb7e4eb | |||
| 2b7e87a33c | |||
| feb7c00ab5 | |||
| f02c7d66b6 | |||
| 37a8aac243 | |||
| 3f7aa00618 | |||
| f9b1f57c71 | |||
| 316c332fa0 | |||
| ed6f435e1c | |||
| 1cd31069e2 | |||
| a401c2733a | |||
| 2e69b2483e | |||
| bd5a2f28fc | |||
| 2fb75ad2a7 | |||
| 57b7b66b58 | |||
| da18a4b093 | |||
| de19d5ceeb | |||
| 3c39fd6db8 | |||
| a2f30a72f7 | |||
| 3942a9c815 | |||
| 884b7ed153 | |||
| 149eecf6ef | |||
| b9121a022d | |||
| 97374a7259 | |||
| 1999164de0 | |||
| afa80cb2b4 | |||
| 7852449fe2 | |||
| 3980a9c100 | |||
| 10887d272a | |||
| 07428f6a64 | |||
| 1add233756 | |||
| 7fad1ee92c | |||
| 073e58a9fb | |||
| 49c5929363 | |||
| 61b7ebde7c | |||
| 5dcbe84df8 | |||
| 27a5af3ec8 | |||
| 98f204f442 | |||
| 3be8e02692 | |||
| bd31658d04 | |||
| 5048d3ba8d | |||
| cd3a03682f | |||
| f5cffc18d1 | |||
| 0fa88e19c4 | |||
| d4259b45a4 | |||
| 22ae2896dd | |||
| a268a6c985 | |||
| fa857b2058 | |||
| 29500e14c7 | |||
| 47eb8d30ac | |||
| 23862bc625 | |||
| 670172eae1 | |||
| 64683d9769 | |||
| 05fa7028da | |||
| dffb0ea882 | |||
| 2a8afc201c | |||
| 437b31cabe | |||
| ba361bcd36 | |||
| 8b3724f85f | |||
| 26fc28a21a | |||
| c7505715ca | |||
| 3af27fc59e | |||
| 250bb8a9d6 | |||
| c6a9dc36b7 | |||
| b0a1368dc2 | |||
| ed7af823cb | |||
| 95e00ac365 | |||
| f261df73b5 | |||
| a7b8e4cab4 | |||
| a6580b70a3 | |||
| 9e754f4bad | |||
| a624133944 | |||
| 5babee86cb | |||
| 880facb6d7 | |||
| a3ed22ee48 | |||
| 7a1e526688 | |||
| 2c56466851 | |||
| cd3cce09ff | |||
| b7c2fb9237 | |||
| d5badecd7f | |||
| 83afb9612c | |||
| b2e0131860 | |||
| 08ddb22c64 | |||
| 29723fffa5 | |||
| adffc54541 | |||
| 79c4c4add6 | |||
| 21d8d62bdb | |||
| d9b21b6336 | |||
| 1515fed2bf | |||
| 012c38428b | |||
| fdc3c81a67 | |||
| f093225bc4 | |||
| 04964cdd4d | |||
| 7b98e44eef | |||
| 22867df4e7 | |||
| 0ca77b3e89 | |||
| 523f6bd9ad | |||
| 4454992303 | |||
| 7a455fccaa | |||
| 6ccb19f35d | |||
| bb6ea21b41 | |||
| 0ebe8e7c41 | |||
| efed05629f | |||
| a54ac5353d | |||
| 7de5b8df7c | |||
| e8916f41d8 | |||
| f8e196812c | |||
| 4daf7e97e6 | |||
| 59e9781df8 | |||
| fe33927d75 | |||
| 6720d4f40f | |||
| 4c3f8a9b89 | |||
| a34680b295 | |||
| 7aeb36153a | |||
| e5aa186c43 | |||
| c1bd5ac440 | |||
| e06e4eb5f3 | |||
| 3ebcafd1ec | |||
| 6e1bb6ef2e | |||
| 26598dbacc | |||
| aa747d186f | |||
| 21aa3f379f | |||
| 488449f04c | |||
| d84348da11 | |||
| 3db0754003 | |||
| 4a971b9142 | |||
| 5c7cfc77cd | |||
| 0de71d3615 | |||
| 5ff02b0da2 | |||
| 26b2bef2a8 | |||
| f0b589f768 | |||
| 837dc15e51 | |||
| bfbcda7ec1 | |||
| 5004c05666 | |||
| c3355394bf | |||
| 0cb0ff0535 | |||
| 9880f818cf | |||
| 0f2f21af96 | |||
| 45b043725a | |||
| 8e03cb2b01 | |||
| 08d027c3b6 | |||
| f689a8a955 | |||
| 34e36d9102 | |||
| 0b64fc4599 | |||
| 1166bf5866 | |||
| 6ee5217845 | |||
| d48749331d | |||
| b2e6c32580 | |||
| 8072030b3c | |||
| 9e5e2ceff5 | |||
| c4412c12a7 | |||
| 441de8b2e0 | |||
| 26c14fa6e1 | |||
| c187d9abe7 |
+10
-1
@@ -29,6 +29,7 @@ berkeley/lpc
|
||||
berkeley/lpq
|
||||
berkeley/lpr
|
||||
berkeley/lprm
|
||||
cgi-bin/makedocset
|
||||
cgi-bin/testcgi
|
||||
cgi-bin/testhi
|
||||
cgi-bin/testhi.index
|
||||
@@ -44,9 +45,11 @@ cups/testadmin
|
||||
cups/testarray
|
||||
cups/testcache
|
||||
cups/testconflicts
|
||||
cups/testcreds
|
||||
cups/testcups
|
||||
cups/testdest
|
||||
cups/testfile
|
||||
cups/testgetdests
|
||||
cups/testhttp
|
||||
cups/testi18n
|
||||
cups/testipp
|
||||
@@ -58,6 +61,7 @@ cups/testsnmp
|
||||
cups/tlscheck
|
||||
desktop/cups.desktop
|
||||
doc/index.html
|
||||
doc/*/index.html
|
||||
filter/commandtops
|
||||
filter/gziptoany
|
||||
filter/pstops
|
||||
@@ -67,6 +71,7 @@ filter/rastertohp
|
||||
filter/rastertolabel
|
||||
filter/rastertopwg
|
||||
filter/test.raster
|
||||
filter/testclient
|
||||
filter/testraster
|
||||
locale/checkpo
|
||||
locale/po2strings
|
||||
@@ -82,10 +87,12 @@ man/lpoptions.man
|
||||
man/mantohtml
|
||||
monitor/bcp
|
||||
monitor/tbcp
|
||||
notifier/dbus
|
||||
notifier/mailto
|
||||
notifier/rss
|
||||
notifier/testnotify
|
||||
packaging/cups.list
|
||||
org.cups.docset*
|
||||
patches
|
||||
ppdc/genstrings
|
||||
ppdc/ppd/
|
||||
@@ -137,11 +144,13 @@ systemv/lpoptions
|
||||
systemv/lpstat
|
||||
systemv/reject
|
||||
templates/header.tmpl
|
||||
templates/*/header.tmpl
|
||||
test/cups-str-*.html
|
||||
test/error_log-*
|
||||
test/*_log-*
|
||||
test/ippfind
|
||||
test/ippfind-static
|
||||
test/ippserver
|
||||
test/ippserver-shared
|
||||
test/ipptool
|
||||
test/ipptool-static
|
||||
xcode/CUPS.xcodeproj/project.xcworkspace/
|
||||
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
CHANGES - 2.2.6 - 2017-11-01
|
||||
============================
|
||||
|
||||
|
||||
Changes in CUPS v2.2.6
|
||||
----------------------
|
||||
|
||||
- DBUS notifications could crash the scheduler (Issue #5143)
|
||||
- Added USB quirks rules for Canon MP540 and Samsung ML-2160 (Issue #5148)
|
||||
- Fixed TLS cipher suite selection with GNU TLS (Issue #5145, Issue #5150)
|
||||
- Localization updates (Issue #5152)
|
||||
|
||||
|
||||
Changes in CUPS v2.2.5
|
||||
----------------------
|
||||
|
||||
- The scheduler's `-t` option did not force all errors to the standard error
|
||||
file, making debugging of configuration problems hard (Issue #5041)
|
||||
- Fixed a typo in the CUPS Programming Manual (Issue #5042)
|
||||
- Fixed RPM packaging issue (Issue #5043, Issue #5044)
|
||||
- The `cupsGetDests` function incorrectly returned an empty list of printers if
|
||||
there was no default printer (Issue #5046)
|
||||
- The `cupsGetDests` function waited too long for network printers (Issue #5049)
|
||||
- Libtool support was completely broken with current libtool versions that use
|
||||
an incompatible command-line syntax (Issue #5050)
|
||||
- Fixed a build issue with `--enable-mallinfo` (Issue #5051)
|
||||
- The ippserver test program contained a deadlock issue (Issue #5054)
|
||||
- The `cupsLocalizeDest*` functions did not provide base localizations for
|
||||
all registered IPP attributes and values (Issue #5056)
|
||||
- The --enable-libtool configure option requires a path to the libtool program,
|
||||
but doesn't document or check for it (Issue #5062)
|
||||
- Fixed the `SSLOptions DenyCBC` option when using GNU TLS (Issue #5065)
|
||||
- Fixed the `ServerTokens None` option (Issue #5065)
|
||||
- Fixed the default `ServerAlias` value from `ServerName` (Issue #5072)
|
||||
- Fixed the adminurl field in the TXT record for fully-qualified `ServerName`
|
||||
values (Issue #5074)
|
||||
- The scheduler now creates a PID file when not running on demand with a modern
|
||||
service launcher (Issue #5080)
|
||||
- The web interface did not support newer language identifiers used by Microsoft
|
||||
web browsers (Issue #5803)
|
||||
- Updated the cups-files.conf and cupsd.conf file documentation for missing
|
||||
directives (Issue #5084)
|
||||
- Fixed an Avahi-related crash bug in the scheduler (Issue #5085, Issue #5086)
|
||||
- Fixed the interactions between the "print-quality" and "cupsPrintQuality"
|
||||
options (Issue #5090)
|
||||
- The IPP Everywhere PPD generator now sorts the supported resolutions before
|
||||
choosing them for draft, normal, and best quality modes (Issue #5091)
|
||||
- Fixed the localization unit test on Linux (Issue #5097)
|
||||
- The CUPS library did not reuse domain sockets (Issue #5098)
|
||||
- Fixed the "make check" target for some environments (Issue #5099)
|
||||
- The scheduler woke up once per second to remove old temporary queues
|
||||
(Issue #5100)
|
||||
- Added USB quirk rule for Kyocera printer (Issue #5102, Issue #5103)
|
||||
- Re-documented the limits of `file:///...` device URIs and moved the FileDevice
|
||||
directive in `cups-files.conf` to the list of deprecated configuration
|
||||
directives (Issue #5117)
|
||||
- Added USB quirk rule for HP LaserJet 1160 printer (Issue #5121)
|
||||
- Fixed the script interpreter detection in the configure script (Issue #5122)
|
||||
- The network backends now retry on more error conditions (Issue #5123)
|
||||
- Added a French translation of the web interface (Issue #5134)
|
||||
- `cupsGetDests2` was not using the supplied HTTP connection (Issue #5135)
|
||||
- `httpAddrConnect` leaked sockets in certain circumstances, causing some
|
||||
printers to hang (rdar://31965686)
|
||||
- Fixed an issue with Chinese localizations on macOS (rdar://32419311)
|
||||
- The IPP backend now always sends the "finishings" attribute for printers that
|
||||
support it because otherwise the client cannot override printer defaults
|
||||
(rdar://33169732)
|
||||
- The `cupsGetNamedDest` function did not use the local default printer
|
||||
(rdar://33228500)
|
||||
- The IPP backend incorrectly sent the "job-pages-per-set" attribute to PDF
|
||||
printers (rdar://33250434)
|
||||
- Fixed the `cups.strings` file that is used on macOS (rdar://33287650)
|
||||
- CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034)
|
||||
- The `ippCopyAttribute` function did not copy out-of-band values correctly
|
||||
(rdar://33688003)
|
||||
- Fixed the localization fallback code on macOS (rdar://33583699)
|
||||
- The scheduler did not run with a high enough priority, causing problems on
|
||||
busy systems (rdar://33789342)
|
||||
- Added support for Japanese Kaku 1 envelope size (rdar://34774110)
|
||||
- The `ipptool` program's `-P` option did not work correctly.
|
||||
- The `ipptool` program did not compare URI scheme or hostname components
|
||||
correctly for the WITH-ALL-HOSTNAMES, WITH-ALL-SCHEMES, WITH-HOSTNAME, or
|
||||
WITH-SCHEME predicates.
|
||||
|
||||
|
||||
Changes in CUPS v2.2.4
|
||||
----------------------
|
||||
|
||||
- The scheduler did not remove old job files (Issue #4987)
|
||||
- cupsEnumDests did not return early when all printers had been discovered
|
||||
(Issue #4989)
|
||||
- The CUPS build system now supports cross-compilation (Issue #4897)
|
||||
- Added a new CUPS Programming Manual to replace the aging API documentation.
|
||||
- Added the `cupsAddIntegerOption` and `cupsGetIntegerOption` functions
|
||||
(Issue #4992)
|
||||
- The `cupsGetDests` and `cupsCreateJob` functions now support Bonjour printers
|
||||
(Issue #4993)
|
||||
- Added a USB quirk rule for Lexmark E260dn printers (Issue #4994)
|
||||
- Fixed a potential buffer overflow in the `cupstestppd` utility (Issue #4996)
|
||||
- IPP Everywhere improvements (Issue #4998)
|
||||
- Fixed the "cancel all jobs" function in the web interface for several
|
||||
languages (Issue #4999)
|
||||
- Fixed issues with local queues (Issue #5003, Issue #5008, Issue #5009)
|
||||
- The `lpstat` command now supports a `-e` option to enumerate local printers
|
||||
(either previously added or on the network) that can be accessed
|
||||
(Issue #5005)
|
||||
- The `lp` and `lpr` commands now support printing to network printers that
|
||||
haven't yet been added (Issue #5006)
|
||||
- Fixed a typo in the mime.types file.
|
||||
- Fixed a bug in the Spanish web interface template (Issue #5016)
|
||||
- The `cupsEnumDests*` and `cupsGetDest*` functions now report the value of the
|
||||
"printer-is-temporary" Printer Status attribute (Issue #5028)
|
||||
- Added Chinese localization (Issue #5029)
|
||||
- The `cupsCheckDestSupported` function did not support `NULL` values
|
||||
(Issue #5031)
|
||||
- Fixed some issues in the RPM spec file (Issue #5032)
|
||||
- The `cupsConnectDest` function now supports the `CUPS_DEST_FLAGS_DEVICE` flag
|
||||
for explicitly connecting to the device (printer) associated with the
|
||||
destination.
|
||||
- The `SSLOptions` directive in "client.conf" and "cupsd.conf" now supports
|
||||
`DenyCBC` and `DenyTLS1.0` options (Issue #5037)
|
||||
|
||||
|
||||
Changes in CUPS v2.2.3
|
||||
----------------------
|
||||
|
||||
- The IPP backend could get into an infinite loop for certain errors, causing a
|
||||
hung queue (<rdar://problem/28008717>)
|
||||
- The scheduler could pause responding to client requests in order to save state
|
||||
changes to disk (<rdar://problem/28690656>)
|
||||
- Added support for PPD finishing keywords (Issue #4960, Issue #4961,
|
||||
Issue #4962)
|
||||
- The IPP backend did not send a media-col attribute for just the source or type
|
||||
(Issue #4963)
|
||||
- IPP Everywhere print queues did not always support all print qualities
|
||||
supported by the printer (Issue #4953)
|
||||
- IPP Everywhere print queues did not always support all media types supported
|
||||
by the printer (Issue #4953)
|
||||
- The IPP Everywhere PPD generator did not return useful error messages
|
||||
(Issue #4954)
|
||||
- The IPP Everywhere finishings support did not work correctly with common UI or
|
||||
command-line options (Issue #4976)
|
||||
- Fixed an error handling issue for the network backends (Issue #4979)
|
||||
- The default cupsd.conf file did not work on systems compiled without Kerberos
|
||||
support (Issue #4947)
|
||||
- The "reprint job" option was not available for some canceled jobs
|
||||
(Issue #4915)
|
||||
- Updated the job listing in the web interface (Issue #4978)
|
||||
- Fixed some localization issues on macOS (<rdar://problem/27245567>)
|
||||
|
||||
|
||||
Changes in CUPS v2.2.2
|
||||
----------------------
|
||||
|
||||
- Fixed some issues with the Zebra ZPL printer driver (Issue #4898)
|
||||
- Fixed some issues with IPP Everywhere printer support (Issue #4893,
|
||||
Issue #4909, Issue #4916, Issue #4921, Issue #4923, Issue #4932, Issue #4933,
|
||||
Issue #4938)
|
||||
- The rastertopwg filter could crash with certain input (Issue #4942)
|
||||
- Optimized connection usage in the IPP backend (<rdar://problem/29547323>)
|
||||
- The scheduler did not detect when an encrypted connection was closed by the
|
||||
client on Linux (Issue #4901)
|
||||
- The cups-lpd program did not catch all legacy usage of ISO-8859-1
|
||||
(Issue #4899)
|
||||
- Fixed builds on systems without a working poll() implementation (Issue #4905)
|
||||
- Added a USB quirk rule for the Kyocera Ecosys P6026cdn (Issue #4900)
|
||||
- The scheduler no longer creates log files on startup
|
||||
(<rdar://problem/28332470>)
|
||||
- The ippContainsString function now uses case-insensitive comparisons for
|
||||
mimeMediaType, name, and text values in conformance with RFC 2911.
|
||||
- The network backends now log the addresses that were found for a printer
|
||||
(<rdar://problem/29268474>)
|
||||
- Let's Encrypt certificates did not work when the hostname contained uppercase
|
||||
letters (Issue #4919)
|
||||
- Fixed reporting of printed pages in the web interface (Issue #4924)
|
||||
- Updated systemd config files (Issue #4935)
|
||||
- Updated documentation (PR #4896)
|
||||
- Updated localizations (PR #4894, PR #4895, PR #4904, PR #4908, Issue #4946)
|
||||
- Updated packaging files (Issue #4940)
|
||||
|
||||
|
||||
Changes in CUPS v2.2.1
|
||||
----------------------
|
||||
|
||||
- Added "CreateSelfSignedCerts" directive for cups-files.conf to control whether
|
||||
the scheduler automatically creates its own self-signed X.509 certificates for
|
||||
TLS connections (Issue #4876)
|
||||
- http*Connect did not handle partial failures (Issue #4870)
|
||||
- Addressed some build warnings on Linux (Issue #4881)
|
||||
- cupsHashData did not use the correct hashing algorithm
|
||||
(<rdar://problem/28209220>)
|
||||
- Updated man pages (PR #4885)
|
||||
- Updated localizations (PR #4877, PR #4886)
|
||||
|
||||
|
||||
Changes in CUPS v2.2.0
|
||||
----------------------
|
||||
|
||||
- Normalized the TLS certificate validation code and added additional error
|
||||
messages to aid troubleshooting.
|
||||
- The httpConnect functions did not work on Linux when cupsd was not running
|
||||
(Issue #4870)
|
||||
- The --no-remote-any option of cupsctl had no effect (Issue #4866)
|
||||
- http*Connect did not return early when all addresses failed (Issue #4870)
|
||||
|
||||
|
||||
Changes in CUPS v2.2rc1
|
||||
-----------------------
|
||||
|
||||
- Updated the list of supported IPP Everywhere media types.
|
||||
- The IPP backend did not validate TLS credentials properly.
|
||||
- The printer-state-message attribute was not cleared after a print job with no
|
||||
errors (Issue #4851)
|
||||
- The CUPS-Add-Modify-Class and CUPS-Add-Modify-Printer operations did not
|
||||
always return an error for failed adds (Issue #4854)
|
||||
- PPD files with names longer than 127 bytes did not work (Issue #4860)
|
||||
- Updated localizations (Issue #4846, PR #4858)
|
||||
|
||||
|
||||
Changes in CUPS v2.2b2
|
||||
----------------------
|
||||
|
||||
- Added Upstart support (PR #4825)
|
||||
- CUPS now supports Let's Encrypt certificates on Linux.
|
||||
|
||||
|
||||
Changes in CUPS v2.2b1
|
||||
----------------------
|
||||
|
||||
- All CUPS commands now support POSIX options (Issue #4813)
|
||||
- The scheduler now restarts faster (Issue #4760)
|
||||
- Improved performance of web interface with large numbers of jobs (Issue #3819)
|
||||
- Encrypted printing can now be limited to only trusted printers and servers
|
||||
(<rdar://problem/25711658>)
|
||||
- The scheduler now advertises PWG Raster attributes for IPP Everywhere clients
|
||||
(Issue #4428)
|
||||
- The scheduler now logs informational messages for jobs at LogLevel "info"
|
||||
(Issue #4815)
|
||||
- The scheduler now uses the getgrouplist function when available (Issue #4611)
|
||||
- The IPP backend no longer enables compression by default except for certain
|
||||
raster formats that generally benefit from it (<rdar://problem/25166952>)
|
||||
- The scheduler did not handle out-of-disk situations gracefully (Issue #4742)
|
||||
- The LPD mini-daemon now detects invalid UTF-8 sequences in job, document, and
|
||||
user names (Issue #4748)
|
||||
- The IPP backend now continues on to the next job when the remote server/
|
||||
printer puts the job on hold (<rdar://problem/24858548>)
|
||||
- The scheduler did not cancel multi-document jobs immediately
|
||||
(<rdar://problem/24854834>)
|
||||
- The scheduler did not return non-shared printers to local clients unless they
|
||||
connected to the domain socket (<rdar://problem/24566996>)
|
||||
- The scheduler now reads the spool directory if one or more job cache entries
|
||||
point to deleted jobs (<rdar://problem/24048846>)
|
||||
- Added support for disc media sizes (<rdar://problem/20219536>)
|
||||
- The httpAddrConnect and httpConnect* APIs now try connecting to multiple
|
||||
addresses in parallel (<rdar://problem/20643153>)
|
||||
- The cupsd domain socket is no longer world-accessible on macOS
|
||||
(<rdar://problem/7542560>)
|
||||
- Interface scripts are no longer supported for security reasons
|
||||
(<rdar://problem/23135640>)
|
||||
- Added a new cupsHashData API and support for hashed job passwords
|
||||
(<rdar://problem/20221502>)
|
||||
- Localization fixes (<rdar://problem/25292403>, <rdar://problem/25461517>,
|
||||
Issue #4041, Issue #4796)
|
||||
- Documentation changes (Issue #4624, Issue #4781)
|
||||
- Packaging fixes (PR #4832)
|
||||
@@ -1,45 +0,0 @@
|
||||
CHANGES.txt - 2.2b1 - 2016-06-02
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.2b1
|
||||
|
||||
- All CUPS commands now support POSIX options (Issue #4813)
|
||||
- The scheduler now restarts faster (Issue #4760)
|
||||
- Improved performance of web interface with large numbers of jobs
|
||||
(Issue #3819)
|
||||
- Encrypted printing can now be limited to only trusted printers and
|
||||
servers (<rdar://problem/25711658>)
|
||||
- The scheduler now advertises PWG Raster attributes for IPP Everywhere
|
||||
clients (Issue #4428)
|
||||
- The scheduler now logs informational messages for jobs at LogLevel
|
||||
"info" (Issue #4815)
|
||||
- The scheduler now uses the getgrouplist function when available
|
||||
(Issue #4611)
|
||||
- The IPP backend no longer enables compression by default except for
|
||||
certain raster formats that generally benefit from it
|
||||
(<rdar://problem/25166952>)
|
||||
- The scheduler did not handle out-of-disk situations gracefully
|
||||
(Issue #4742)
|
||||
- The LPD mini-daemon now detects invalid UTF-8 sequences in job,
|
||||
document, and user names (Issue #4748)
|
||||
- The IPP backend now continues on to the next job when the remote
|
||||
server/printer puts the job on hold (<rdar://problem/24858548>)
|
||||
- The scheduler did not cancel multi-document jobs immediately
|
||||
(<rdar://problem/24854834>)
|
||||
- The scheduler did not return non-shared printers to local clients
|
||||
unless they connected to the domain socket (<rdar://problem/24566996>)
|
||||
- The scheduler now reads the spool directory if one or more job cache
|
||||
entries point to deleted jobs (<rdar://problem/24048846>)
|
||||
- Added support for disc media sizes (<rdar://problem/20219536>)
|
||||
- The httpAddrConnect and httpConnect* APIs now try connecting to
|
||||
multiple addresses in parallel (<rdar://problem/20643153>)
|
||||
- The cupsd domain socket is no longer world-accessible on OS X
|
||||
(<rdar://problem/7542560>)
|
||||
- Interface scripts are no longer supported for security reasons
|
||||
(<rdar://problem/23135640>)
|
||||
- Added a new cupsHashData API and support for hashed job passwords
|
||||
(<rdar://problem/20221502>)
|
||||
- Localization fixes (<rdar://problem/25292403>,
|
||||
<rdar://problem/25461517>, Issue #4041, Issue #4796)
|
||||
- Documentation changes (Issue #4624, Issue #4781)
|
||||
- Packaging fixes (PR #4832)
|
||||
+3
-3
@@ -131,7 +131,7 @@ columns.
|
||||
> Note:
|
||||
>
|
||||
> The ".cxx" extension is used because it is the only common C++ extension
|
||||
> between Linux, OS X, UNIX, and Windows.
|
||||
> between Linux, macOS, UNIX, and Windows.
|
||||
|
||||
The top of each source file contains a header giving the purpose or nature of
|
||||
the source file and the copyright and licensing notice:
|
||||
@@ -613,8 +613,8 @@ target rule is used to create the automatic dependencies:
|
||||
depend:
|
||||
TAB $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
|
||||
|
||||
We regenerate the automatic dependencies on an OS X system and express any
|
||||
non-OS X dependencies statically in the makefile.
|
||||
We regenerate the automatic dependencies on an macOS system and express any
|
||||
non-macOS dependencies statically in the makefile.
|
||||
|
||||
|
||||
### INSTALL/UNINSTALL SUPPORT
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
CREDITS.txt - 2013-07-23
|
||||
------------------------
|
||||
CREDITS - 2017-05-01
|
||||
====================
|
||||
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd
|
||||
like to thank the following individuals for their contributions:
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd like
|
||||
to thank the following individuals for their contributions:
|
||||
|
||||
Niklas 'Nille' Åkerström - Swedish localization.
|
||||
Nathaniel Barbour - Lots of testing and feedback.
|
||||
N. Becker - setsid().
|
||||
Philippe Combes - French localization and buttons script.
|
||||
@@ -17,20 +18,20 @@ like to thank the following individuals for their contributions:
|
||||
Wang Jian - CUPS RPM corrections.
|
||||
Roderick Johnstone - Beta tester of the millenium.
|
||||
Till Kamppeter - Bug fixes, beta testing, evangelism.
|
||||
Iñaki Larrañaga - Basque localization.
|
||||
Kenshi Muto - Japanese localization, patches, and
|
||||
testing.
|
||||
Tomohiro Kato - Japanese localization.
|
||||
Kiko - Bug fixes.
|
||||
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
|
||||
Marek Laane - Estonian translation.
|
||||
Iñaki Larrañaga - Basque localization.
|
||||
Mark Lawrence - Microsoft interoperability testing.
|
||||
Jeff Licquia - Bug fixes, beta testing, evangelism.
|
||||
Jason McMullan - Original CUPS RPM distributions.
|
||||
Àngel Mompó - Catalan localization.
|
||||
Wes Morgan - *BSD fixes.
|
||||
Kenshi Muto - Japanese localization, patches, and
|
||||
testing.
|
||||
Brian Norris - Upstart support.
|
||||
Daniel Nylander - Swedish localization.
|
||||
Niklas 'Nille' Åkerström - Swedish localization.
|
||||
Naruiko Ogasawara - Japanese localization.
|
||||
Giulio Orsero - Bug fixes and testing.
|
||||
Michal Osowiecki - Polish localization.
|
||||
@@ -40,6 +41,7 @@ like to thank the following individuals for their contributions:
|
||||
Petter Reinholdtsen - HP-UX compiler stuff.
|
||||
Juan Pablo González Riopedre - Spanish localization.
|
||||
Giovanni Scafora - Italian localization.
|
||||
Joachim Schwender - German localization.
|
||||
Opher Shachar - Hebrew localization.
|
||||
Stuart Stevens - HP JetDirect IPP information.
|
||||
Andrea Suatoni - IRIX desktop integration and testing.
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
INSTALL - CUPS v2.2.6 - 2017-11-01
|
||||
==================================
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
information on CUPS see the file called "README.md". A complete change log can
|
||||
be found in "CHANGES.md".
|
||||
|
||||
Using CUPS requires additional third-party support software and printer drivers.
|
||||
These are typically included with your operating system distribution. Apple
|
||||
does not endorse or support third-party support software for CUPS.
|
||||
|
||||
> Note: Current versions of macOS DO NOT allow installation to /usr with the
|
||||
> default System Integrity Protection (SIP) settings. In addition, we do not
|
||||
> recommend replacing the CUPS supplied with macOS because:
|
||||
>
|
||||
> a. not all versions of CUPS are compatible with every macOS release,
|
||||
>
|
||||
> b. code signing prevents replacement of system libraries and access to the
|
||||
> system keychain (needed for encrypted printer sharing), and
|
||||
>
|
||||
> c. software updates will often replace parts of your local installation,
|
||||
> potentially rendering your system unusable.
|
||||
>
|
||||
> Apple only supports using the Clang supplied with Xcode to build CUPS on
|
||||
> macOS.
|
||||
|
||||
|
||||
BEFORE YOU BEGIN
|
||||
----------------
|
||||
|
||||
You'll need ANSI-compliant C and C++ compilers, plus a make program and POSIX-
|
||||
compliant shell (/bin/sh). The GNU compiler tools and Bash work well and we
|
||||
have tested the current CUPS code against several versions of GCC with excellent
|
||||
results.
|
||||
|
||||
The makefiles used by the project should work with most versions of make. We've
|
||||
tested them with GNU make as well as the make programs shipped by Compaq, HP,
|
||||
SGI, and Sun. BSD users should use GNU make (gmake) since BSD make does not
|
||||
support "include".
|
||||
|
||||
Besides these tools you'll want ZLIB library for compression support, the GNU
|
||||
TLS library for encryption support on platforms other than iOS, macOS, or
|
||||
Windows, and either MIT (1.6.3 or higher) or Heimdal Kerberos for Kerberos
|
||||
support. CUPS will compile and run without these, however you'll miss out on
|
||||
many of the features provided by CUPS.
|
||||
|
||||
On a stock Ubuntu install, the following command will install the required
|
||||
prerequisites:
|
||||
|
||||
sudo apt-get install autoconf build-essential libavahi-client-dev \
|
||||
libgnutls28-dev libkrb5-dev libnss-mdns libpam-dev \
|
||||
libsystemd-dev libusb-1.0-0-dev zlib1g-dev
|
||||
|
||||
Also, please note that CUPS does not include print filters to support PDF or
|
||||
raster printing. You *must* download GPL Ghostscript and/or the Open Printing
|
||||
CUPS filters package separately to print on operating systems other than macOS.
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
CUPS uses GNU autoconf, so you should find the usual "configure" script in the
|
||||
main CUPS source directory. To configure CUPS for your system, type:
|
||||
|
||||
./configure
|
||||
|
||||
The default installation will put the CUPS software in the "/etc", "/usr", and
|
||||
"/var" directories on your system, which will overwrite any existing printing
|
||||
commands on your system. Use the `--prefix` option to install the CUPS software
|
||||
in another location:
|
||||
|
||||
./configure --prefix=/some/directory
|
||||
|
||||
> Note: Current versions of macOS DO NOT allow installation to /usr with the
|
||||
> default System Integrity Protection (SIP) settings.
|
||||
|
||||
To see a complete list of configuration options, use the `--help` option:
|
||||
|
||||
./configure --help
|
||||
|
||||
If any of the dependent libraries are not installed in a system default location
|
||||
(typically "/usr/include" and "/usr/lib") you'll need to set the CFLAGS,
|
||||
CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables prior to running
|
||||
configure:
|
||||
|
||||
setenv CFLAGS "-I/some/directory"
|
||||
setenv CPPFLAGS "-I/some/directory"
|
||||
setenv CXXFLAGS "-I/some/directory"
|
||||
setenv DSOFLAGS "-L/some/directory"
|
||||
setenv LDFLAGS "-L/some/directory"
|
||||
./configure ...
|
||||
|
||||
or:
|
||||
|
||||
CFLAGS="-I/some/directory" \
|
||||
CPPFLAGS="-I/some/directory" \
|
||||
CXXFLAGS="-I/some/directory" \
|
||||
DSOFLAGS="-L/some/directory" \
|
||||
LDFLAGS="-L/some/directory" \
|
||||
./configure ...
|
||||
|
||||
The `--enable-debug` option compiles CUPS with debugging information enabled.
|
||||
Additional debug logging support can be enabled using the
|
||||
`--enable-debug-printfs` option - these debug messages are enabled using the
|
||||
`CUPS_DEBUG_xxx` environment variables at run-time.
|
||||
|
||||
CUPS also includes an extensive set of unit tests that can be used to find and
|
||||
diagnose a variety of common problems - use the "--enable-unit-tests" configure
|
||||
option to run them at build time.
|
||||
|
||||
On macOS, use the `--with-archflags` option to build with the correct set of
|
||||
architectures:
|
||||
|
||||
./configure --with-archflags="-arch i386 -arch x86_64" ...
|
||||
|
||||
Once you have configured things, just type:
|
||||
|
||||
make ENTER
|
||||
|
||||
or if you have FreeBSD, NetBSD, or OpenBSD type:
|
||||
|
||||
gmake ENTER
|
||||
|
||||
to build the software.
|
||||
|
||||
|
||||
TESTING THE SOFTWARE
|
||||
--------------------
|
||||
|
||||
Aside from the built-in unit tests, CUPS includes an automated test framework
|
||||
for testing the entire printing system. To run the tests, just type:
|
||||
|
||||
make check ENTER
|
||||
|
||||
or if you have FreeBSD, NetBSD, or OpenBSD type:
|
||||
|
||||
gmake check ENTER
|
||||
|
||||
The test framework runs a copy of the CUPS scheduler (cupsd) on port 8631 in
|
||||
/tmp/cups-$USER and produces a nice HTML report of the results.
|
||||
|
||||
|
||||
INSTALLING THE SOFTWARE
|
||||
-----------------------
|
||||
|
||||
Once you have built the software you need to install it. The "install" target
|
||||
provides a quick way to install the software on your local system:
|
||||
|
||||
make install ENTER
|
||||
|
||||
or for FreeBSD, NetBSD, or OpenBSD:
|
||||
|
||||
gmake install ENTER
|
||||
|
||||
Use the BUILDROOT variable to install to an alternate root directory:
|
||||
|
||||
make BUILDROOT=/some/other/root/directory install ENTER
|
||||
|
||||
You can also build binary packages that can be installed on other machines using
|
||||
the RPM spec file ("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building of binary RPMs, so
|
||||
it may be more convenient to use.
|
||||
|
||||
You can find the RPM software at:
|
||||
|
||||
http://www.rpm.org/
|
||||
|
||||
The EPM software is available at:
|
||||
|
||||
https://michaelrsweet.github.io/epm
|
||||
|
||||
|
||||
CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
--------------------------------------
|
||||
|
||||
The top level makefile supports generation of many types of binary distributions
|
||||
using EPM. To build a binary distribution type:
|
||||
|
||||
make <format> ENTER
|
||||
|
||||
or
|
||||
|
||||
gmake <format> ENTER
|
||||
|
||||
for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of the following:
|
||||
|
||||
- "epm": Builds a script + tarfile package
|
||||
- "bsd": Builds a *BSD package
|
||||
- "deb": Builds a Debian package
|
||||
- "pkg": Builds a Solaris package
|
||||
- "rpm": Builds a RPM package
|
||||
- "slackware": Build a Slackware package
|
||||
|
||||
|
||||
GETTING DEBUG LOGGING FROM CUPS
|
||||
-------------------------------
|
||||
|
||||
When configured with the `--enable-debug-printfs` option, CUPS compiles in
|
||||
additional debug logging support in the scheduler, CUPS API, and CUPS Imaging
|
||||
API. The following environment variables are used to enable and control debug
|
||||
logging:
|
||||
|
||||
- `CUPS_DEBUG_FILTER`: Specifies a POSIX regular expression to control which
|
||||
messages are logged.
|
||||
- `CUPS_DEBUG_LEVEL`: Specifies a number from 0 to 9 to control the verbosity of
|
||||
the logging. The default level is 1.
|
||||
- `CUPS_DEBUG_LOG`: Specifies a log file to use. Specify the name "-" to send
|
||||
the messages to stderr. Prefix a filename with "+" to append to an existing
|
||||
file. You can include a single "%d" in the filename to embed the current
|
||||
process ID.
|
||||
|
||||
|
||||
REPORTING PROBLEMS
|
||||
------------------
|
||||
|
||||
If you have problems, *read the documentation first*! If the documentation does
|
||||
not solve your problems, please post a message on the users forum at:
|
||||
|
||||
https://www.cups.org/
|
||||
|
||||
Include your operating system and version, compiler and version, and any errors
|
||||
or problems you've run into. The "config.log" file and the output from the
|
||||
configure script and make should also be sent, as it often helps to determine
|
||||
the cause of your problem.
|
||||
|
||||
If you are running a version of Linux, be sure to provide the Linux distribution
|
||||
you have, too.
|
||||
-213
@@ -1,213 +0,0 @@
|
||||
INSTALL - CUPS v2.2b1 - 2016-05-31
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
information on CUPS see the file called "README.txt". A complete change log can
|
||||
be found in "CHANGES.txt".
|
||||
|
||||
*******************************************************************************
|
||||
*******************************************************************************
|
||||
**** ****
|
||||
**** USING CUPS REQUIRES ADDITIONAL THIRD-PARTY SUPPORT SOFTWARE AND ****
|
||||
**** PRINTER DRIVERS. THESE ARE TYPICALLY INCLUDED WITH YOUR OPERATING ****
|
||||
**** SYSTEM DISTRIBUTION. APPLE DOES NOT ENDORSE OR SUPPORT THIRD-PARTY ****
|
||||
**** SUPPORT SOFTWARE FOR CUPS. ****
|
||||
**** ****
|
||||
*******************************************************************************
|
||||
*******************************************************************************
|
||||
|
||||
|
||||
BEFORE YOU BEGIN
|
||||
|
||||
You'll need ANSI-compliant C and C++ compilers, plus a make program and
|
||||
POSIX-compliant shell (/bin/sh). The GNU compiler tools and Bash work well
|
||||
and we have tested the current CUPS code against several versions of GCC
|
||||
with excellent results.
|
||||
|
||||
The makefiles used by the project should work with most versions of make.
|
||||
We've tested them with GNU make as well as the make programs shipped by
|
||||
Compaq, HP, SGI, and Sun. BSD users should use GNU make (gmake) since BSD
|
||||
make does not support "include".
|
||||
|
||||
Besides these tools you'll want ZLIB library for compression support, the
|
||||
CDSA, GNU TLS, or OpenSSL libraries for encryption support, and either MIT
|
||||
(1.6.3 or higher) or Heimdal Kerberos for Kerberos support. CUPS will
|
||||
compile and run without these, however you'll miss out on many of the
|
||||
features provided by CUPS.
|
||||
|
||||
Also, please note that CUPS does not include print filters to support PDF
|
||||
or raster printing. You *must* download GPL Ghostscript and/or the Open
|
||||
Printing CUPS filters package separately to print on operating systems
|
||||
other than OS X.
|
||||
|
||||
|
||||
COMPILING THE SUBVERSION REPOSITORY CODE
|
||||
|
||||
The CUPS Subversion repository doesn't hold a copy of the pre-built
|
||||
configure script. You'll need to run the GNU autoconf software (2.60 or
|
||||
higher) to create it:
|
||||
|
||||
autoconf
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
|
||||
CUPS uses GNU autoconf, so you should find the usual "configure" script in
|
||||
the main CUPS source directory. To configure CUPS for your system, type:
|
||||
|
||||
./configure
|
||||
|
||||
The default installation will put the CUPS software in the "/etc", "/usr",
|
||||
and "/var" directories on your system, which will overwrite any existing
|
||||
printing commands on your system. Use the "--prefix" option to install the
|
||||
CUPS software in another location:
|
||||
|
||||
./configure --prefix=/some/directory
|
||||
|
||||
To see a complete list of configuration options, use the --help option:
|
||||
|
||||
./configure --help
|
||||
|
||||
If any of the dependent libraries are not installed in a system default
|
||||
location (typically "/usr/include" and "/usr/lib") you'll need to set the
|
||||
CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables
|
||||
prior to running configure:
|
||||
|
||||
setenv CFLAGS "-I/some/directory"
|
||||
setenv CPPFLAGS "-I/some/directory"
|
||||
setenv CXXFLAGS "-I/some/directory"
|
||||
setenv DSOFLAGS "-L/some/directory"
|
||||
setenv LDFLAGS "-L/some/directory"
|
||||
./configure ...
|
||||
|
||||
or:
|
||||
|
||||
CFLAGS="-I/some/directory" \
|
||||
CPPFLAGS="-I/some/directory" \
|
||||
CXXFLAGS="-I/some/directory" \
|
||||
DSOFLAGS="-L/some/directory" \
|
||||
LDFLAGS="-L/some/directory" \
|
||||
./configure ...
|
||||
|
||||
The "--enable-debug" option compiles CUPS with debugging information
|
||||
enabled. Additional debug logging support can be enabled using the
|
||||
"--enable-debug-printfs" option - these debug messages are enabled using the
|
||||
CUPS_DEBUG_LOG environment variable at run-time.
|
||||
|
||||
CUPS also includes an extensive set of unit tests that can be used to find
|
||||
and diagnose a variety of common problems - use the "--enable-unit-tests"
|
||||
configure option to run them at build time.
|
||||
|
||||
On OS X, use the "--with-archflags" option to build with the correct set of
|
||||
architectures:
|
||||
|
||||
./configure --with-archflags="-arch i386 -arch x86_64" ...
|
||||
|
||||
Once you have configured things, just type:
|
||||
|
||||
make ENTER
|
||||
|
||||
or if you have FreeBSD, NetBSD, or OpenBSD type:
|
||||
|
||||
gmake ENTER
|
||||
|
||||
to build the software.
|
||||
|
||||
|
||||
TESTING THE SOFTWARE
|
||||
|
||||
Aside from the built-in unit tests, CUPS includes an automated test
|
||||
framework for testing the entire printing system. To run the tests, just
|
||||
type:
|
||||
|
||||
make check ENTER
|
||||
|
||||
or if you have FreeBSD, NetBSD, or OpenBSD type:
|
||||
|
||||
gmake check ENTER
|
||||
|
||||
The test framework runs a copy of the CUPS scheduler (cupsd) on port 8631
|
||||
in /tmp/cups-$USER and produces a nice HTML report of the results.
|
||||
|
||||
|
||||
INSTALLING THE SOFTWARE
|
||||
|
||||
Once you have built the software you need to install it. The "install"
|
||||
target provides a quick way to install the software on your local system:
|
||||
|
||||
make install ENTER
|
||||
|
||||
or for FreeBSD, NetBSD, or OpenBSD:
|
||||
|
||||
gmake install ENTER
|
||||
|
||||
Use the BUILDROOT variable to install to an alternate root directory:
|
||||
|
||||
make BUILDROOT=/some/other/root/directory install ENTER
|
||||
|
||||
You can also build binary packages that can be installed on other machines
|
||||
using the RPM spec file ("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building of binary RPMs,
|
||||
so it may be more convenient to use.
|
||||
|
||||
You can find the RPM software at:
|
||||
|
||||
http://www.rpm.org/
|
||||
|
||||
The EPM software is available at:
|
||||
|
||||
http://www.msweet.org/
|
||||
|
||||
|
||||
CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
|
||||
The top level makefile supports generation of many types of binary
|
||||
distributions using EPM. To build a binary distribution type:
|
||||
|
||||
make <format> ENTER
|
||||
|
||||
or
|
||||
|
||||
gmake <format> ENTER
|
||||
|
||||
for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of the
|
||||
following:
|
||||
|
||||
epm - Builds a script + tarfile package
|
||||
bsd - Builds a *BSD package
|
||||
deb - Builds a Debian package
|
||||
pkg - Builds a Solaris package
|
||||
rpm - Builds a RPM package
|
||||
slackware - Build a Slackware package
|
||||
|
||||
|
||||
GETTING DEBUG LOGGING FROM CUPS
|
||||
|
||||
When configured with the "--enable-debug-printfs" option, CUPS compiles in
|
||||
additional debug logging support in the scheduler, CUPS API, and CUPS
|
||||
Imaging API. The following environment variables are used to enable and
|
||||
control debug logging:
|
||||
|
||||
CUPS_DEBUG_FILTER Specifies a POSIX regular expression to control
|
||||
which messages are logged.
|
||||
CUPS_DEBUG_LEVEL Specifies a number from 0 to 9 to control the
|
||||
verbosity of the logging. The default level is 1.
|
||||
CUPS_DEBUG_LOG Specifies a log file to use. Specify the name "-"
|
||||
to send the messages to stderr. Prefix a filename
|
||||
with "+" to append to an existing file.
|
||||
|
||||
|
||||
REPORTING PROBLEMS
|
||||
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! If the documentation
|
||||
does not solve your problems, please post a message on the users forum at:
|
||||
|
||||
http://www.cups.org/
|
||||
|
||||
Include your operating system and version, compiler and version, and any
|
||||
errors or problems you've run into. The "config.log" file and the output
|
||||
from the configure script and make should also be sent, as it often helps to
|
||||
determine the cause of your problem.
|
||||
|
||||
If you are running a version of Linux, be sure to provide the Linux
|
||||
distribution you have, too.
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
CUPS License Agreement
|
||||
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
Copyright 2007-2016 by Apple Inc.
|
||||
1 Infinite Loop
|
||||
Cupertino, CA 95014 USA
|
||||
|
||||
@@ -70,8 +70,8 @@ the following special exception:
|
||||
b. An Apple Operating System means any operating system
|
||||
software developed and/or marketed by Apple Inc.,
|
||||
including but not limited to all existing releases and
|
||||
versions of Apple's Darwin, OS X, and OS X Server
|
||||
products and all follow-on releases and future
|
||||
versions of Apple's Darwin, iOS, macOS, macOS Server, and
|
||||
tvOS products and all follow-on releases and future
|
||||
versions thereof.
|
||||
|
||||
c. This exception is only available for Apple
|
||||
|
||||
+26
-8
@@ -1,32 +1,42 @@
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
#
|
||||
# CUPS version...
|
||||
#
|
||||
|
||||
CUPS_VERSION = @CUPS_VERSION@
|
||||
|
||||
|
||||
#
|
||||
# Programs...
|
||||
#
|
||||
|
||||
AR = @AR@
|
||||
AWK = @AWK@
|
||||
CC = @LIBTOOL@ @CC@
|
||||
CC = @LIBTOOL_CC@ @CC@
|
||||
CHMOD = @CHMOD@
|
||||
CXX = @LIBTOOL@ @CXX@
|
||||
CXX = @LIBTOOL_CXX@ @CXX@
|
||||
DSO = @DSO@
|
||||
DSOXX = @DSOXX@
|
||||
GZIP = @GZIP@
|
||||
INSTALL = @INSTALL@
|
||||
LD = @LD@
|
||||
LD_CC = @LD_CC@
|
||||
LD_CXX = @LD_CXX@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN = @LN@ -sf
|
||||
MKDIR = @MKDIR@ -p
|
||||
MV = @MV@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@ -f
|
||||
@@ -38,14 +48,14 @@ SHELL = /bin/sh
|
||||
# Installation programs...
|
||||
#
|
||||
|
||||
INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
|
||||
INSTALL_BIN = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
|
||||
INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
|
||||
INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
|
||||
INSTALL_DATA = $(INSTALL) -c -m 444
|
||||
INSTALL_DIR = $(INSTALL) -d
|
||||
INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
|
||||
INSTALL_LIB = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
|
||||
INSTALL_MAN = $(INSTALL) -c -m 444
|
||||
INSTALL_SCRIPT = $(INSTALL) -c -m 555
|
||||
INSTALL_SCRIPT = $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
|
||||
|
||||
#
|
||||
# Default user, group, and system groups for the scheduler...
|
||||
@@ -72,6 +82,14 @@ LANGUAGES = @LANGUAGES@
|
||||
INSTALL_LANGUAGES = @INSTALL_LANGUAGES@
|
||||
UNINSTALL_LANGUAGES = @UNINSTALL_LANGUAGES@
|
||||
|
||||
#
|
||||
# Cross-compilation support: "local" target is used for any tools that are
|
||||
# built and run locally.
|
||||
#
|
||||
|
||||
LOCALTARGET = @LOCALTARGET@
|
||||
|
||||
|
||||
#
|
||||
# Libraries...
|
||||
#
|
||||
@@ -141,7 +159,7 @@ IPPFIND_MAN = @IPPFIND_MAN@
|
||||
LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
|
||||
-L../scheduler @LDARCHFLAGS@ \
|
||||
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ)
|
||||
LINKCUPSIMAGE = @LINKCUPSIMAGE@
|
||||
LIBS = $(LINKCUPS) $(COMMONLIBS)
|
||||
ONDEMANDFLAGS = @ONDEMANDFLAGS@
|
||||
|
||||
+3
-10
@@ -8,7 +8,7 @@
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include Makedefs
|
||||
@@ -314,22 +314,15 @@ sloc:
|
||||
|
||||
EPMFLAGS = -v --output-dir dist $(EPMARCH)
|
||||
|
||||
bsd deb pkg slackware:
|
||||
bsd deb epm pkg rpm slackware:
|
||||
epm $(EPMFLAGS) -f $@ cups packaging/cups.list
|
||||
|
||||
epm:
|
||||
epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
|
||||
|
||||
rpm:
|
||||
epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
|
||||
|
||||
.PHONEY: dist
|
||||
.PHONY: dist
|
||||
dist: all
|
||||
$(RM) -r dist
|
||||
$(MAKE) $(MFLAGS) epm
|
||||
case `uname` in \
|
||||
*BSD*) $(MAKE) $(MFLAGS) bsd;; \
|
||||
Darwin*) $(MAKE) $(MFLAGS) osx;; \
|
||||
Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
|
||||
SunOS*) $(MAKE) $(MFLAGS) pkg;; \
|
||||
esac
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
README - CUPS v2.2.6 - 2017-11-01
|
||||
=================================
|
||||
|
||||
Looking for compile instructions? Read the file `INSTALL.md` instead...
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
------------
|
||||
|
||||
|
||||
CUPS is a standards-based, open source printing system developed by Apple Inc.
|
||||
for macOS® and other UNIX®-like operating systems. CUPS uses the Internet
|
||||
Printing Protocol ("IPP") and provides System V and Berkeley command-line
|
||||
interfaces, a web interface, and a C API to manage printers and print jobs. It
|
||||
supports printing to both local (parallel, serial, USB) and networked printers,
|
||||
and printers can be shared from one computer to another, even over the Internet!
|
||||
|
||||
Internally, CUPS uses PostScript Printer Description ("PPD") files to describe
|
||||
printer capabilities and features and a wide variety of generic and device-
|
||||
specific programs to convert and print many types of files. Sample drivers are
|
||||
included with CUPS to support many Dymo, EPSON, HP, Intellitech, OKIDATA, and
|
||||
Zebra printers. Many more drivers are available online and (in some cases) on
|
||||
the driver CD-ROM that came with your printer.
|
||||
|
||||
CUPS is licensed under the GNU General Public License and GNU Library General
|
||||
Public License versions 2. See the file "LICENSE.txt" for more information.
|
||||
|
||||
|
||||
READING THE DOCUMENTATION
|
||||
-------------------------
|
||||
|
||||
Once you have installed the software you can access the documentation (and a
|
||||
bunch of other stuff) online at <http://localhost:631/>.
|
||||
|
||||
If you're having trouble getting that far, the documentation is located under
|
||||
the `doc/help` and `man` directories.
|
||||
|
||||
Please read the documentation before asking questions.
|
||||
|
||||
|
||||
GETTING SUPPORT AND OTHER RESOURCES
|
||||
-----------------------------------
|
||||
|
||||
If you have problems, *read the documentation first!* We also provide two
|
||||
mailing lists which are available at <https://lists.cups.org/mailman/listinfo>.
|
||||
|
||||
See the CUPS web site at <https://www.cups.org/> for other resources.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES USING YOUR WEB BROWSER
|
||||
------------------------------------------------
|
||||
|
||||
CUPS includes a web-based administration tool that allows you to manage
|
||||
printers, classes, and jobs on your server. Open <http://localhost:631/admin/>
|
||||
in your browser to access the printer administration tools:
|
||||
|
||||
*Do not* use the hostname for your machine - it will not work with the default
|
||||
CUPS configuration. To enable administration access on other addresses, check
|
||||
the `Allow Remote Administration` box and click on the `Change Settings button.
|
||||
|
||||
You will be asked for the administration password (root or any other user in the
|
||||
sys/system/root/admin/lpadmin group on your system) when performing any
|
||||
administrative function.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
-----------------------------------------------
|
||||
|
||||
CUPS currently uses PPD (PostScript Printer Description) files that describe
|
||||
printer capabilities and driver programs needed for each printer. The
|
||||
`everywhere` PPD is used for nearly all modern networks printers sold since
|
||||
about 2009. For example, the following command creates a print queue for a
|
||||
printer at address 11.22.33.44:
|
||||
|
||||
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
|
||||
|
||||
CUPS also includes several sample PPD files you can use for "legacy" printers:
|
||||
|
||||
Driver PPD Name
|
||||
----------------------------- ------------------------------
|
||||
Dymo Label Printers drv:///sample.drv/dymo.ppd
|
||||
Intellitech Intellibar drv:///sample.drv/intelbar.ppd
|
||||
EPSON 9-pin Series drv:///sample.drv/epson9.ppd
|
||||
EPSON 24-pin Series drv:///sample.drv/epson24.ppd
|
||||
Generic PCL Laser Printer drv:///sample.drv/generpcl.ppd
|
||||
Generic PostScript Printer drv:///sample.drv/generic.ppd
|
||||
HP DeskJet Series drv:///sample.drv/deskjet.ppd
|
||||
HP LaserJet Series drv:///sample.drv/laserjet.ppd
|
||||
OKIDATA 9-Pin Series drv:///sample.drv/okidata9.ppd
|
||||
OKIDATA 24-Pin Series drv:///sample.drv/okidat24.ppd
|
||||
Zebra CPCL Label Printer drv:///sample.drv/zebracpl.ppd
|
||||
Zebra EPL1 Label Printer drv:///sample.drv/zebraep1.ppd
|
||||
Zebra EPL2 Label Printer drv:///sample.drv/zebraep2.ppd
|
||||
Zebra ZPL Label Printer drv:///sample.drv/zebra.ppd
|
||||
|
||||
You can run the `lpinfo -m` command to list all of the available drivers:
|
||||
|
||||
lpinfo -m
|
||||
|
||||
Run the `lpinfo -v` command to list the available printers:
|
||||
|
||||
lpinfo -v
|
||||
|
||||
Then use the correct URI to add the printer using the `lpadmin` command:
|
||||
|
||||
lpadmin -p printername -E -v device-uri -m ppd-name
|
||||
|
||||
Current network printers typically use `ipp` or `ipps` URIS:
|
||||
|
||||
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
|
||||
lpadmin -p printername -E -v ipps://11.22.33.44/ipp/print -m everywhere
|
||||
|
||||
Older network printers typically use `socket` or `lpd` URIs:
|
||||
|
||||
lpadmin -p printername -E -v socket://11.22.33.44 -m ppd-name
|
||||
lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
|
||||
|
||||
The sample drivers provide basic printing capabilities, but generally do not
|
||||
exercise the full potential of the printers or CUPS. Other drivers provide
|
||||
greater printing capabilities.
|
||||
|
||||
|
||||
PRINTING FILES
|
||||
--------------
|
||||
|
||||
CUPS provides both the System V `lp` and Berkeley `lpr` commands for printing:
|
||||
|
||||
lp filename
|
||||
lpr filename
|
||||
|
||||
Both the `lp` and `lpr` commands support printing options for the driver:
|
||||
|
||||
lp -o media=A4 -o resolution=600dpi filename
|
||||
lpr -o media=A4 -o resolution=600dpi filename
|
||||
|
||||
CUPS recognizes many types of images files as well as PDF, PostScript, and text
|
||||
files, so you can print those files directly rather than through an application.
|
||||
|
||||
If you have an application that generates output specifically for your printer
|
||||
then you need to use the `-oraw` or `-l` options:
|
||||
|
||||
lp -o raw filename
|
||||
lpr -l filename
|
||||
|
||||
This will prevent the filters from misinterpreting your print file.
|
||||
|
||||
|
||||
LEGAL STUFF
|
||||
-----------
|
||||
|
||||
CUPS is copyright © 2007-2017 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
CUPS is provided under the terms of version 2 of the GNU General Public License
|
||||
and GNU Library General Public License. This program is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
`doc/help/license.html` or `LICENSE.txt` files for more information.
|
||||
-152
@@ -1,152 +0,0 @@
|
||||
README - CUPS v2.2b1 - 2016-05-31
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
CUPS is a standards-based, open source printing system developed by Apple
|
||||
Inc. for OS® X and other UNIX®-like operating systems. CUPS uses the
|
||||
Internet Printing Protocol ("IPP") and provides System V and Berkeley
|
||||
command-line interfaces, a web interface, and a C API to manage printers and
|
||||
print jobs. It supports printing to both local (parallel, serial, USB) and
|
||||
networked printers, and printers can be shared from one computer to another,
|
||||
even over the Internet!
|
||||
|
||||
Internally, CUPS uses PostScript Printer Description ("PPD") files to
|
||||
describe printer capabilities and features and a wide variety of generic
|
||||
and device-specific programs to convert and print many types of files.
|
||||
Sample drivers are included with CUPS to support many Dymo, EPSON, HP,
|
||||
Intellitech, OKIDATA, and Zebra printers. Many more drivers are available
|
||||
online and (in some cases) on the driver CD-ROM that came with your printer.
|
||||
|
||||
CUPS is licensed under the GNU General Public License and GNU Library
|
||||
General Public License versions 2. See the file "LICENSE.txt" for more
|
||||
information.
|
||||
|
||||
|
||||
READING THE DOCUMENTATION
|
||||
|
||||
Once you have installed the software you can access the documentation (and
|
||||
a bunch of other stuff) online at:
|
||||
|
||||
http://localhost:631/
|
||||
|
||||
If you're having trouble getting that far, the documentation is located
|
||||
under the "doc/help" directory.
|
||||
|
||||
Please read the documentation before asking questions.
|
||||
|
||||
|
||||
GETTING SUPPORT AND OTHER RESOURCES
|
||||
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! We also provide two
|
||||
mailing lists which are available at:
|
||||
|
||||
http://www.cups.org/lists.php
|
||||
|
||||
See the CUPS web site at "http://www.cups.org/" for other resources.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES USING YOUR WEB BROWSER
|
||||
|
||||
CUPS includes a web-based administration tool that allows you to manage
|
||||
printers, classes, and jobs on your server. Open the following URL in your
|
||||
browser to access the printer administration tools:
|
||||
|
||||
http://localhost:631/admin/
|
||||
|
||||
DO NOT use the hostname for your machine - it will not work with the default
|
||||
CUPS configuration. To enable administration access on other addresses,
|
||||
check the "Allow Remote Administration" box and click on the "Change
|
||||
Settings" button.
|
||||
|
||||
You will be asked for the administration password (root or any other user in
|
||||
the sys/system/root/admin/lpadmin group on your system) when performing any
|
||||
administrative function.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
|
||||
CUPS works best with PPD (PostScript Printer Description) files. In a pinch
|
||||
you can also use System V style printer interface scripts.
|
||||
|
||||
CUPS includes several sample PPD files you can use:
|
||||
|
||||
Driver PPD Name
|
||||
----------------------------- ------------------------------
|
||||
Dymo Label Printers drv:///sample.drv/dymo.ppd
|
||||
Intellitech Intellibar drv:///sample.drv/intelbar.ppd
|
||||
EPSON 9-pin Series drv:///sample.drv/epson9.ppd
|
||||
EPSON 24-pin Series drv:///sample.drv/epson24.ppd
|
||||
Generic PCL Laser Printer drv:///sample.drv/generpcl.ppd
|
||||
Generic PostScript Printer drv:///sample.drv/generic.ppd
|
||||
HP DeskJet Series drv:///sample.drv/deskjet.ppd
|
||||
HP LaserJet Series drv:///sample.drv/laserjet.ppd
|
||||
OKIDATA 9-Pin Series drv:///sample.drv/okidata9.ppd
|
||||
OKIDATA 24-Pin Series drv:///sample.drv/okidat24.ppd
|
||||
Zebra CPCL Label Printer drv:///sample.drv/zebracpl.ppd
|
||||
Zebra EPL1 Label Printer drv:///sample.drv/zebraep1.ppd
|
||||
Zebra EPL2 Label Printer drv:///sample.drv/zebraep2.ppd
|
||||
Zebra ZPL Label Printer drv:///sample.drv/zebra.ppd
|
||||
|
||||
Run the "lpinfo -m" command to list the available drivers:
|
||||
|
||||
lpinfo -m
|
||||
|
||||
Run the "lpinfo -v" command to list the available printers:
|
||||
|
||||
lpinfo -v
|
||||
|
||||
Then use the correct URI to add the printer using the "lpadmin" command:
|
||||
|
||||
lpadmin -p printername -E -v device-uri -m ppd-name
|
||||
|
||||
Network printers typically use "socket" or "lpd" URIs:
|
||||
|
||||
lpadmin -p printername -E -v socket://11.22.33.44 -m ppd-name
|
||||
lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
|
||||
|
||||
The sample drivers provide basic printing capabilities, but generally do not
|
||||
exercise the full potential of the printers or CUPS.
|
||||
|
||||
|
||||
PRINTING FILES
|
||||
|
||||
CUPS provides both the System V "lp" and Berkeley "lpr" commands for
|
||||
printing:
|
||||
|
||||
lp filename
|
||||
lpr filename
|
||||
|
||||
Both the "lp" and "lpr" commands support printing options for the driver:
|
||||
|
||||
lp -o media=A4 -o resolution=600dpi filename
|
||||
lpr -o media=A4 -o resolution=600dpi filename
|
||||
|
||||
CUPS recognizes many types of images files as well as PDF, PostScript,
|
||||
and text files, so you can print those files directly rather than through
|
||||
an application.
|
||||
|
||||
If you have an application that generates output specifically for your
|
||||
printer then you need to use the "-oraw" or "-l" options:
|
||||
|
||||
lp -o raw filename
|
||||
lpr -l filename
|
||||
|
||||
This will prevent the filters from misinterpreting your print file.
|
||||
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2016 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
CUPS is provided under the terms of version 2 of the GNU General Public
|
||||
License and GNU Library General Public License. This program is distributed
|
||||
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the "doc/help/license.html" or "LICENSE.txt" files for more information.
|
||||
+13
-13
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# Backend makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2016 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
# This file is subject to the Apple OS-Developed Software exception.
|
||||
#
|
||||
@@ -24,7 +24,7 @@ include ../Makedefs
|
||||
# UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
|
||||
# an unprivileged user...
|
||||
#
|
||||
# See http://www.cups.org/documentation.php/api-filter.html for more info...
|
||||
# See http://www.cups.org/doc/api-filter.html for more info...
|
||||
RBACKENDS = \
|
||||
ipp \
|
||||
lpd \
|
||||
@@ -207,7 +207,7 @@ uninstall:
|
||||
|
||||
test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
|
||||
$(LD_CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
|
||||
@@ -249,7 +249,7 @@ libbackend.a: $(LIBOBJS)
|
||||
|
||||
dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
|
||||
if test `uname` = Darwin; then \
|
||||
$(RM) mdns; \
|
||||
$(LN) dnssd mdns; \
|
||||
@@ -262,7 +262,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
|
||||
|
||||
ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
|
||||
$(RM) http
|
||||
$(LN) ipp http
|
||||
|
||||
@@ -273,7 +273,7 @@ ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
|
||||
|
||||
lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -282,7 +282,7 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
|
||||
|
||||
snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -291,11 +291,11 @@ snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
|
||||
|
||||
socket: socket.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
|
||||
|
||||
socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o socket-static socket.o libbackend.a \
|
||||
$(LD_CC) $(LDFLAGS) -o socket-static socket.o libbackend.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
|
||||
@@ -306,7 +306,7 @@ socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a
|
||||
|
||||
usb: usb.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
|
||||
$(BACKLIBS) $(LIBS)
|
||||
usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
|
||||
|
||||
|
||||
@@ -312,6 +312,7 @@ extern int backendGetDeviceID(int fd, char *device_id,
|
||||
extern int backendGetMakeModel(const char *device_id,
|
||||
char *make_model,
|
||||
size_t make_model_size);
|
||||
extern http_addrlist_t *backendLookup(const char *hostname, int port, int *cancel);
|
||||
extern int backendNetworkSideCB(int print_fd, int device_fd,
|
||||
int snmp_fd, http_addr_t *addr,
|
||||
int use_bc);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
* Copyright 2008-2017 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -949,7 +949,7 @@ get_device(cups_array_t *devices, /* I - Device array */
|
||||
*
|
||||
* Note: This function is needed because avahi_simple_poll_iterate is broken
|
||||
* and always uses a timeout of 0 (!) milliseconds.
|
||||
* (Avahi Ticket #364)
|
||||
* (https://github.com/lathiat/avahi/issues/127)
|
||||
*/
|
||||
|
||||
static int /* O - Number of file descriptors matching */
|
||||
|
||||
@@ -88,7 +88,7 @@ backendGetDeviceID(
|
||||
*device_id = '\0';
|
||||
|
||||
# ifdef __linux
|
||||
if (ioctl(fd, LPIOC_GET_DEVICE_ID(device_id_size), device_id))
|
||||
if (ioctl(fd, LPIOC_GET_DEVICE_ID((unsigned)device_id_size), device_id))
|
||||
{
|
||||
/*
|
||||
* Linux has to implement things differently for every device it seems.
|
||||
|
||||
+156
-111
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -160,6 +160,7 @@ static void cancel_job(http_t *http, const char *uri, int id,
|
||||
static ipp_pstate_t check_printer_state(http_t *http, const char *uri,
|
||||
const char *resource,
|
||||
const char *user, int version);
|
||||
static void debug_attributes(ipp_t *ipp);
|
||||
static void *monitor_printer(_cups_monitor_t *monitor);
|
||||
static ipp_t *new_request(ipp_op_t op, int version, const char *uri,
|
||||
const char *user, const char *title,
|
||||
@@ -222,7 +223,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
*compatfile = NULL; /* Compatibility filename */
|
||||
off_t compatsize = 0; /* Size of compatibility file */
|
||||
int port; /* Port number (not used) */
|
||||
char portname[255]; /* Port name */
|
||||
char uri[HTTP_MAX_URI]; /* Updated URI without user/pass */
|
||||
char print_job_name[1024]; /* Update job-name for Print-Job */
|
||||
http_status_t http_status; /* Status of HTTP request */
|
||||
@@ -663,69 +663,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
start_time = time(NULL);
|
||||
|
||||
sprintf(portname, "%d", port);
|
||||
|
||||
update_reasons(NULL, "+connecting-to-device");
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "INFO",
|
||||
_("Unable to locate printer \"%s\"."), hostname);
|
||||
sleep(10);
|
||||
|
||||
if (getenv("CLASS") != NULL)
|
||||
{
|
||||
update_reasons(NULL, "-connecting-to-device");
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
if (job_canceled)
|
||||
return (CUPS_BACKEND_OK);
|
||||
}
|
||||
addrlist = backendLookup(hostname, port, &job_canceled);
|
||||
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, cupsEncryption(), 1,
|
||||
0, NULL);
|
||||
httpSetTimeout(http, 30.0, timeout_cb, NULL);
|
||||
|
||||
if (httpIsEncrypted(http))
|
||||
{
|
||||
/*
|
||||
* Validate TLS credentials...
|
||||
*/
|
||||
|
||||
cups_array_t *creds; /* TLS credentials */
|
||||
cups_array_t *lcreds = NULL; /* Loaded credentials */
|
||||
http_trust_t trust; /* Trust level */
|
||||
static const char *trusts[] = { NULL, "+cups-pki-invalid", "+cups-pki-changed", "+cups-pki-expired", NULL, "+cups-pki-unknown" };
|
||||
/* Trust keywords */
|
||||
|
||||
if (!httpCopyCredentials(http, &creds))
|
||||
{
|
||||
trust = httpCredentialsGetTrust(creds, hostname);
|
||||
|
||||
update_reasons(NULL, "-cups-pki-invalid,cups-pki-changed,cups-pki-expired,cups-pki-unknown");
|
||||
if (trusts[trust])
|
||||
{
|
||||
update_reasons(NULL, trusts[trust]);
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
if (httpLoadCredentials(NULL, &lcreds, hostname))
|
||||
{
|
||||
/*
|
||||
* Could not load the credentials, let's save the ones we have so we
|
||||
* can detect changes...
|
||||
*/
|
||||
|
||||
httpSaveCredentials(NULL, creds, hostname);
|
||||
}
|
||||
|
||||
httpFreeCredentials(lcreds);
|
||||
httpFreeCredentials(creds);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* See if the printer supports SNMP...
|
||||
*/
|
||||
@@ -800,8 +743,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
|
||||
|
||||
if (errno == ECONNREFUSED || errno == EHOSTDOWN ||
|
||||
errno == EHOSTUNREACH)
|
||||
if (errno == ECONNREFUSED || errno == EHOSTDOWN || errno == EHOSTUNREACH || errno == ETIMEDOUT || errno == ENOTCONN)
|
||||
{
|
||||
if (contimeout && (time(NULL) - start_time) > contimeout)
|
||||
{
|
||||
@@ -820,13 +762,13 @@ main(int argc, /* I - Number of command-line args */
|
||||
break;
|
||||
|
||||
case EHOSTUNREACH :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is unreachable at this "
|
||||
"time."));
|
||||
break;
|
||||
|
||||
case ECONNREFUSED :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is in use."));
|
||||
break;
|
||||
@@ -856,6 +798,76 @@ main(int argc, /* I - Number of command-line args */
|
||||
else if (!http)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
|
||||
if (httpIsEncrypted(http))
|
||||
{
|
||||
/*
|
||||
* Validate TLS credentials...
|
||||
*/
|
||||
|
||||
cups_array_t *creds; /* TLS credentials */
|
||||
cups_array_t *lcreds = NULL; /* Loaded credentials */
|
||||
http_trust_t trust; /* Trust level */
|
||||
char credinfo[1024], /* Information on credentials */
|
||||
lcredinfo[1024];/* Information on saved credentials */
|
||||
static const char * const trusts[] = { NULL, "+cups-pki-invalid", "+cups-pki-changed", "+cups-pki-expired", NULL, "+cups-pki-unknown" };
|
||||
/* Trust keywords */
|
||||
static const char * const trust_msgs[] =
|
||||
{
|
||||
"Credentials are OK/trusted",
|
||||
"Credentials are invalid",
|
||||
"Credentials have changed",
|
||||
"Credentials are expired",
|
||||
"Credentials have been renewed",
|
||||
"Credentials are unknown/new"
|
||||
};
|
||||
|
||||
fputs("DEBUG: Connection is encrypted.\n", stderr);
|
||||
|
||||
if (!httpCopyCredentials(http, &creds))
|
||||
{
|
||||
trust = httpCredentialsGetTrust(creds, hostname);
|
||||
httpCredentialsString(creds, credinfo, sizeof(credinfo));
|
||||
|
||||
fprintf(stderr, "DEBUG: %s (%s)\n", trust_msgs[trust], cupsLastErrorString());
|
||||
fprintf(stderr, "DEBUG: Printer credentials: %s\n", credinfo);
|
||||
|
||||
if (!httpLoadCredentials(NULL, &lcreds, hostname))
|
||||
{
|
||||
httpCredentialsString(lcreds, lcredinfo, sizeof(lcredinfo));
|
||||
fprintf(stderr, "DEBUG: Stored credentials: %s\n", lcredinfo);
|
||||
}
|
||||
else
|
||||
fputs("DEBUG: No stored credentials.\n", stderr);
|
||||
|
||||
update_reasons(NULL, "-cups-pki-invalid,cups-pki-changed,cups-pki-expired,cups-pki-unknown");
|
||||
if (trusts[trust])
|
||||
{
|
||||
update_reasons(NULL, trusts[trust]);
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
if (!lcreds)
|
||||
{
|
||||
/*
|
||||
* Could not load the credentials, let's save the ones we have so we
|
||||
* can detect changes...
|
||||
*/
|
||||
|
||||
httpSaveCredentials(NULL, creds, hostname);
|
||||
}
|
||||
|
||||
httpFreeCredentials(lcreds);
|
||||
httpFreeCredentials(creds);
|
||||
}
|
||||
else
|
||||
{
|
||||
fputs("DEBUG: No printer credentials.\n", stderr);
|
||||
|
||||
update_reasons(NULL, "cups-pki-unknown");
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
|
||||
update_reasons(NULL, "-connecting-to-device");
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
|
||||
|
||||
@@ -1456,7 +1468,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
while (!job_canceled && validate_job)
|
||||
{
|
||||
request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2],
|
||||
request = new_request(IPP_OP_VALIDATE_JOB, version, uri, argv[2],
|
||||
monitor.job_name, num_options, options, compression,
|
||||
copies_sup ? copies : 1, document_format, pc, ppd,
|
||||
media_col_sup, doc_handling_sup, print_color_mode_sup);
|
||||
@@ -1467,6 +1479,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fprintf(stderr, "DEBUG: Validate-Job: %s (%s)\n",
|
||||
ippErrorString(ipp_status), cupsLastErrorString());
|
||||
debug_attributes(response);
|
||||
|
||||
if ((job_auth = ippFindAttribute(response, "job-authorization-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
@@ -1519,6 +1532,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
else if (ipp_status < IPP_REDIRECTION_OTHER_SITE ||
|
||||
ipp_status == IPP_BAD_REQUEST)
|
||||
break;
|
||||
else if (job_auth == NULL && ipp_status > IPP_BAD_REQUEST)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1637,6 +1652,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
fprintf(stderr, "DEBUG: %s: %s (%s)\n",
|
||||
(num_files > 1 || create_job) ? "Create-Job" : "Print-Job",
|
||||
ippErrorString(ipp_status), cupsLastErrorString());
|
||||
debug_attributes(response);
|
||||
|
||||
if (ipp_status > IPP_OK_CONFLICT)
|
||||
{
|
||||
@@ -1771,6 +1787,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
"compression", NULL, compression);
|
||||
|
||||
fprintf(stderr, "DEBUG: Sending file %d using chunking...\n", i + 1);
|
||||
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
|
||||
debug_attributes(request);
|
||||
|
||||
http_status = cupsSendRequest(http, request, resource, 0);
|
||||
if (http_status == HTTP_CONTINUE && request->state == IPP_DATA)
|
||||
{
|
||||
@@ -1820,11 +1839,13 @@ main(int argc, /* I - Number of command-line args */
|
||||
fprintf(stderr, "DEBUG: Error writing document data for "
|
||||
"Send-Document: %s\n", strerror(httpError(http)));
|
||||
|
||||
ippDelete(cupsGetResponse(http, resource));
|
||||
response = cupsGetResponse(http, resource);
|
||||
ippDelete(request);
|
||||
|
||||
fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n",
|
||||
ippErrorString(cupsLastError()), cupsLastErrorString());
|
||||
debug_attributes(response);
|
||||
ippDelete(response);
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT && !job_canceled)
|
||||
{
|
||||
@@ -1991,6 +2012,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
"requested-attributes", sizeof(jattrs) / sizeof(jattrs[0]),
|
||||
NULL, jattrs);
|
||||
|
||||
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
|
||||
debug_attributes(request);
|
||||
|
||||
/*
|
||||
* Do the request...
|
||||
*/
|
||||
@@ -2015,6 +2039,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n",
|
||||
ippErrorString(ipp_status), cupsLastErrorString());
|
||||
debug_attributes(response);
|
||||
|
||||
if (ipp_status <= IPP_OK_CONFLICT)
|
||||
password_tries = 0;
|
||||
@@ -2192,7 +2217,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
return (CUPS_BACKEND_HOLD);
|
||||
else if (ipp_status == IPP_INTERNAL_ERROR)
|
||||
return (CUPS_BACKEND_STOP);
|
||||
else if (ipp_status == IPP_CONFLICT)
|
||||
else if (ipp_status == IPP_CONFLICT || ipp_status == IPP_STATUS_ERROR_REQUEST_ENTITY || ipp_status == IPP_STATUS_ERROR_REQUEST_VALUE)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
else if (ipp_status == IPP_REQUEST_VALUE ||
|
||||
ipp_status == IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES ||
|
||||
@@ -2291,6 +2316,9 @@ check_printer_state(
|
||||
"requested-attributes",
|
||||
(int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
|
||||
|
||||
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
|
||||
debug_attributes(request);
|
||||
|
||||
if ((response = cupsDoRequest(http, request, resource)) != NULL)
|
||||
{
|
||||
report_printer_state(response);
|
||||
@@ -2298,12 +2326,12 @@ check_printer_state(
|
||||
if ((attr = ippFindAttribute(response, "printer-state",
|
||||
IPP_TAG_ENUM)) != NULL)
|
||||
printer_state = (ipp_pstate_t)attr->values[0].integer;
|
||||
|
||||
ippDelete(response);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
|
||||
ippErrorString(cupsLastError()), cupsLastErrorString());
|
||||
debug_attributes(response);
|
||||
ippDelete(response);
|
||||
|
||||
/*
|
||||
* Return the printer-state value...
|
||||
@@ -2313,6 +2341,51 @@ check_printer_state(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'debug_attributes()' - Print out the request or response attributes as DEBUG
|
||||
* messages...
|
||||
*/
|
||||
|
||||
static void
|
||||
debug_attributes(ipp_t *ipp) /* I - Request or response message */
|
||||
{
|
||||
ipp_tag_t group; /* Current group */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
char buffer[1024]; /* Value buffer */
|
||||
|
||||
|
||||
for (group = IPP_TAG_ZERO, attr = ippFirstAttribute(ipp);
|
||||
attr;
|
||||
attr = ippNextAttribute(ipp))
|
||||
{
|
||||
const char *name = ippGetName(attr);
|
||||
|
||||
if (!name)
|
||||
{
|
||||
group = IPP_TAG_ZERO;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (group != ippGetGroupTag(attr))
|
||||
{
|
||||
group = ippGetGroupTag(attr);
|
||||
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(group));
|
||||
}
|
||||
|
||||
if (!strcmp(name, "job-password"))
|
||||
strlcpy(buffer, "---", sizeof(buffer));
|
||||
else
|
||||
ippAttributeString(attr, buffer, sizeof(buffer));
|
||||
|
||||
fprintf(stderr, "DEBUG: %s %s%s %s\n", name,
|
||||
ippGetCount(attr) > 1 ? "1setOf " : "",
|
||||
ippTagString(ippGetValueTag(attr)), buffer);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(IPP_TAG_END));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'monitor_printer()' - Monitor the printer state.
|
||||
*/
|
||||
@@ -2358,10 +2431,13 @@ monitor_printer(
|
||||
while (monitor->job_state < IPP_JOB_CANCELED && !job_canceled)
|
||||
{
|
||||
/*
|
||||
* Reconnect to the printer...
|
||||
* Reconnect to the printer as needed...
|
||||
*/
|
||||
|
||||
if (!httpReconnect(http))
|
||||
if (httpGetFd(http) < 0)
|
||||
httpReconnect(http);
|
||||
|
||||
if (httpGetFd(http) >= 0)
|
||||
{
|
||||
/*
|
||||
* Connected, so check on the printer state...
|
||||
@@ -2380,7 +2456,7 @@ monitor_printer(
|
||||
* No job-id yet, so continue...
|
||||
*/
|
||||
|
||||
goto monitor_disconnect;
|
||||
goto monitor_sleep;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2541,20 +2617,14 @@ monitor_printer(
|
||||
(monitor->job_state == IPP_JOB_CANCELED ||
|
||||
monitor->job_state == IPP_JOB_ABORTED))
|
||||
job_canceled = -1;
|
||||
|
||||
/*
|
||||
* Disconnect from the printer - we'll reconnect on the next poll...
|
||||
*/
|
||||
|
||||
monitor_disconnect:
|
||||
|
||||
_httpDisconnect(http);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sleep for N seconds...
|
||||
*/
|
||||
|
||||
monitor_sleep:
|
||||
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
@@ -2566,7 +2636,10 @@ monitor_printer(
|
||||
|
||||
if (job_canceled > 0 && monitor->job_id > 0)
|
||||
{
|
||||
if (!httpReconnect(http))
|
||||
if (httpGetFd(http) < 0)
|
||||
httpReconnect(http);
|
||||
|
||||
if (httpGetFd(http) >= 0)
|
||||
{
|
||||
cancel_job(http, monitor->uri, monitor->job_id, monitor->resource,
|
||||
monitor->user, monitor->version);
|
||||
@@ -2614,9 +2687,6 @@ new_request(
|
||||
{
|
||||
ipp_t *request; /* Request data */
|
||||
const char *keyword; /* PWG keyword */
|
||||
ipp_tag_t group; /* Current group */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
char buffer[1024]; /* Value buffer */
|
||||
|
||||
|
||||
/*
|
||||
@@ -2740,33 +2810,8 @@ new_request(
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", copies);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10,
|
||||
ippOpString(ippGetOperation(request)), ippGetRequestId(request));
|
||||
for (group = IPP_TAG_ZERO, attr = ippFirstAttribute(request);
|
||||
attr;
|
||||
attr = ippNextAttribute(request))
|
||||
{
|
||||
const char *name = ippGetName(attr);
|
||||
|
||||
if (!name)
|
||||
{
|
||||
group = IPP_TAG_ZERO;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (group != ippGetGroupTag(attr))
|
||||
{
|
||||
group = ippGetGroupTag(attr);
|
||||
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(group));
|
||||
}
|
||||
|
||||
ippAttributeString(attr, buffer, sizeof(buffer));
|
||||
fprintf(stderr, "DEBUG: %s %s%s %s\n", name,
|
||||
ippGetCount(attr) > 1 ? "1setOf " : "",
|
||||
ippTagString(ippGetValueTag(attr)), buffer);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(IPP_TAG_END));
|
||||
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
|
||||
debug_attributes(request);
|
||||
|
||||
return (request);
|
||||
}
|
||||
@@ -3317,7 +3362,7 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
if (tmpfilename[0])
|
||||
unlink(tmpfilename);
|
||||
|
||||
exit(1);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-20
@@ -111,7 +111,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*filename, /* File to print */
|
||||
title[256]; /* Title string */
|
||||
int port; /* Port number */
|
||||
char portname[256]; /* Port name (string) */
|
||||
http_addrlist_t *addrlist; /* List of addresses for printer */
|
||||
int snmp_enabled = 1; /* Is SNMP enabled? */
|
||||
int snmp_fd; /* SNMP socket */
|
||||
@@ -411,23 +410,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* Find the printer...
|
||||
*/
|
||||
|
||||
snprintf(portname, sizeof(portname), "%d", port);
|
||||
addrlist = backendLookup(hostname, port, NULL);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "INFO",
|
||||
_("Unable to locate printer \"%s\"."), hostname);
|
||||
sleep(10);
|
||||
|
||||
if (getenv("CLASS") != NULL)
|
||||
{
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
exit(CUPS_BACKEND_FAILED);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* See if the printer supports SNMP...
|
||||
*/
|
||||
|
||||
if (snmp_enabled)
|
||||
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
|
||||
@@ -880,8 +867,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
|
||||
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(error));
|
||||
|
||||
if (error == ECONNREFUSED || error == EHOSTDOWN ||
|
||||
error == EHOSTUNREACH)
|
||||
if (errno == ECONNREFUSED || errno == EHOSTDOWN || errno == EHOSTUNREACH || errno == ETIMEDOUT || errno == ENOTCONN)
|
||||
{
|
||||
if (contimeout && (time(NULL) - start_time) > contimeout)
|
||||
{
|
||||
@@ -899,13 +885,13 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
break;
|
||||
|
||||
case EHOSTUNREACH :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is unreachable at "
|
||||
"this time."));
|
||||
break;
|
||||
|
||||
case ECONNREFUSED :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is in use."));
|
||||
break;
|
||||
|
||||
+60
-2
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Common backend network APIs for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -26,7 +26,6 @@
|
||||
* 'backendCheckSideChannel()' - Check the side-channel for pending requests.
|
||||
*/
|
||||
|
||||
|
||||
void
|
||||
backendCheckSideChannel(
|
||||
int snmp_fd, /* I - SNMP socket */
|
||||
@@ -46,6 +45,65 @@ backendCheckSideChannel(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'backendLookup()' - Lookup the given host and log addresses.
|
||||
*/
|
||||
|
||||
http_addrlist_t * /* O - List of addresses or NULL */
|
||||
backendLookup(const char *hostname, /* I - Hostname */
|
||||
int port, /* I - Port number */
|
||||
int *cancel) /* I - Variable to watch for job cancel */
|
||||
{
|
||||
char portname[32], /* Port number as string */
|
||||
addrname[256]; /* Address as string */
|
||||
http_addrlist_t *addrlist, /* List of addresses */
|
||||
*current; /* Current address */
|
||||
|
||||
|
||||
/*
|
||||
* Lookup the address for the named host...
|
||||
*/
|
||||
|
||||
snprintf(portname, sizeof(portname), "%d", port);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer \"%s\"."), hostname);
|
||||
sleep(10);
|
||||
|
||||
if (getenv("CLASS") != NULL)
|
||||
{
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
exit(CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
exit(CUPS_BACKEND_OK);
|
||||
}
|
||||
}
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
|
||||
/*
|
||||
* Log the addresses we got...
|
||||
*/
|
||||
|
||||
for (current = addrlist; current; current = current->next)
|
||||
fprintf(stderr, "DEBUG: %s=%s\n", hostname, httpAddrString(¤t->addr, addrname, sizeof(addrname)));
|
||||
|
||||
/*
|
||||
* Return...
|
||||
*/
|
||||
|
||||
return (addrlist);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'backendNetworkSideCB()' - Handle common network side-channel commands.
|
||||
*/
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
# Canon, Inc. MP510 Printer (https://bugs.launchpad.net/bugs/1050009)
|
||||
0x04a9 0x1717 unidir
|
||||
|
||||
# Canon, Inc. MP540 Printer, https://bugzilla.redhat.com/967873
|
||||
0x04a9 0x1730 unidir
|
||||
|
||||
# Canon, Inc. MP550 Printer (Issue #4155)
|
||||
0x04a9 0x173d unidir
|
||||
|
||||
@@ -127,6 +130,9 @@
|
||||
# All Samsung devices (https://bugs.launchpad.net/bugs/1032456)
|
||||
0x04e8 soft-reset
|
||||
|
||||
# Samsung ML-2160 Series (https://bugzilla.redhat.com/show_bug.cgi?id=873123)
|
||||
0x04e8 0x330f unidir
|
||||
|
||||
# All Zebra devices (https://bugs.launchpad.net/bugs/1001028)
|
||||
0x0a5f unidir
|
||||
|
||||
@@ -247,3 +253,15 @@
|
||||
|
||||
# Lexmark C540n (Issue #4778)
|
||||
0x043d 0x0139 no-reattach
|
||||
|
||||
# Kyocera Ecosys P6026cdn (Issue #4900)
|
||||
0x0482 0x063f no-reattach
|
||||
|
||||
# Kyocera Ecosys P6130cdn (Issue #5102)
|
||||
0x0482 0x0677 no-reattach
|
||||
|
||||
# Lexmark E260dn (Issue #4994)
|
||||
0x043d 0x0123 no-reattach
|
||||
|
||||
# HP LaserJet 1160 (Issue #5121)
|
||||
0x03f0 0x1e17 delay-close
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
|
||||
* Read error - bail if we don't see EAGAIN or EINTR...
|
||||
*/
|
||||
|
||||
if (errno != EAGAIN || errno != EINTR)
|
||||
if (errno != EAGAIN && errno != EINTR)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Read failed: %s\n", strerror(errno));
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to read print data."));
|
||||
@@ -305,7 +305,7 @@ backendRunLoop(
|
||||
* Read error - bail if we don't see EAGAIN or EINTR...
|
||||
*/
|
||||
|
||||
if (errno != EAGAIN || errno != EINTR)
|
||||
if (errno != EAGAIN && errno != EINTR)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Read failed: %s\n", strerror(errno));
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
|
||||
+4
-22
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AppSocket backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -69,7 +69,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
int contimeout; /* Connection timeout */
|
||||
int waiteof; /* Wait for end-of-file? */
|
||||
int port; /* Port number */
|
||||
char portname[255]; /* Port name */
|
||||
int delay; /* Delay for retries... */
|
||||
int device_fd; /* AppSocket */
|
||||
int error; /* Error code (if any) */
|
||||
@@ -264,23 +263,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
start_time = time(NULL);
|
||||
|
||||
sprintf(portname, "%d", port);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "INFO",
|
||||
_("Unable to locate printer \"%s\"."), hostname);
|
||||
sleep(10);
|
||||
|
||||
if (getenv("CLASS") != NULL)
|
||||
{
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
addrlist = backendLookup(hostname, port, NULL);
|
||||
|
||||
/*
|
||||
* See if the printer supports SNMP...
|
||||
@@ -347,8 +330,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(error));
|
||||
|
||||
if (error == ECONNREFUSED || error == EHOSTDOWN ||
|
||||
error == EHOSTUNREACH)
|
||||
if (errno == ECONNREFUSED || errno == EHOSTDOWN || errno == EHOSTUNREACH || errno == ETIMEDOUT || errno == ENOTCONN)
|
||||
{
|
||||
if (contimeout && (time(NULL) - start_time) > contimeout)
|
||||
{
|
||||
@@ -366,13 +348,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
break;
|
||||
|
||||
case EHOSTUNREACH :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is unreachable at this "
|
||||
"time."));
|
||||
break;
|
||||
|
||||
case ECONNREFUSED :
|
||||
default :
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer is in use."));
|
||||
break;
|
||||
|
||||
@@ -285,7 +285,6 @@ static void parse_options(char *options, char *serial, int serial_size, UInt32 *
|
||||
static void setup_cfLanguage(void);
|
||||
static void soft_reset(void);
|
||||
static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
|
||||
static void log_usb_class_driver(int is_64bit);
|
||||
#define IS_64BIT 1
|
||||
#define IS_NOT_64BIT 0
|
||||
|
||||
@@ -471,11 +470,6 @@ print_device(const char *uri, /* I - Device URI */
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
if (status == noErr && driverBundlePath != NULL && CFStringCompare(driverBundlePath, kUSBGenericTOPrinterClassDriver, 0) != kCFCompareEqualTo)
|
||||
log_usb_class_driver(IS_64BIT);
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
if (driverBundlePath)
|
||||
CFRelease(driverBundlePath);
|
||||
|
||||
@@ -2097,8 +2091,6 @@ static void run_legacy_backend(int argc,
|
||||
|
||||
if (!usb_legacy_status)
|
||||
{
|
||||
log_usb_class_driver(IS_NOT_64BIT);
|
||||
|
||||
/*
|
||||
* Setup a SIGTERM handler then block it before forking...
|
||||
*/
|
||||
@@ -2475,29 +2467,3 @@ static void get_device_id(cups_sc_status_t *status,
|
||||
|
||||
*status = CUPS_SC_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
log_usb_class_driver(int is_64bit) /* I - Is the USB class driver 64-bit? */
|
||||
{
|
||||
/*
|
||||
* Report the usage of legacy USB class drivers to Apple if the user opts into providing
|
||||
* feedback to Apple...
|
||||
*/
|
||||
|
||||
aslmsg aslm = asl_new(ASL_TYPE_MSG);
|
||||
if (aslm)
|
||||
{
|
||||
ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
|
||||
const char *make_model = ppd ? ppd->nickname : NULL;
|
||||
ppd_attr_t *version = ppdFindAttr(ppd, "FileVersion", "");
|
||||
|
||||
asl_set(aslm, "com.apple.message.domain", "com.apple.printing.usb.64bit");
|
||||
asl_set(aslm, "com.apple.message.result", is_64bit ? "yes" : "no");
|
||||
asl_set(aslm, "com.apple.message.signature", make_model ? make_model : "Unknown");
|
||||
asl_set(aslm, "com.apple.message.signature2", version ? version->value : "?.?");
|
||||
asl_set(aslm, "com.apple.message.summarize", "YES");
|
||||
asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "");
|
||||
asl_free(aslm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+6
-6
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# Berkeley commands makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2012 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include ../Makedefs
|
||||
@@ -124,7 +124,7 @@ uninstall:
|
||||
|
||||
lpc: lpc.o ../cups/$(LIBCUPS)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -133,7 +133,7 @@ lpc: lpc.o ../cups/$(LIBCUPS)
|
||||
|
||||
lpq: lpq.o ../cups/$(LIBCUPS)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -142,7 +142,7 @@ lpq: lpq.o ../cups/$(LIBCUPS)
|
||||
|
||||
lpr: lpr.o ../cups/$(LIBCUPS)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -151,7 +151,7 @@ lpr: lpr.o ../cups/$(LIBCUPS)
|
||||
|
||||
lprm: lprm.o ../cups/$(LIBCUPS)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+12
-12
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# CGI makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2016 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include ../Makedefs
|
||||
@@ -219,7 +219,7 @@ libcupscgi.1.dylib: $(LIBOBJS) libcupscgi.exp
|
||||
|
||||
libcupscgi.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
|
||||
-version-info 1:0 $(LIBS)
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ libcupscgi.a: $(LIBOBJS)
|
||||
|
||||
admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ admin.o -lcupscgi $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o $@ admin.o -lcupscgi $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -249,7 +249,7 @@ admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
|
||||
classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ classes.o -lcupscgi $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o $@ classes.o -lcupscgi $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -258,7 +258,7 @@ classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
|
||||
help.cgi: help.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ help.o -lcupscgi $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o $@ help.o -lcupscgi $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -267,7 +267,7 @@ help.cgi: help.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
|
||||
jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ jobs.o -lcupscgi $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o $@ jobs.o -lcupscgi $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -276,7 +276,7 @@ jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
|
||||
makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ makedocset.o libcupscgi.a \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ makedocset.o libcupscgi.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(LIBZ) $(LIBGSSAPI)
|
||||
|
||||
@@ -287,7 +287,7 @@ makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ printers.o -L. -lcupscgi $(LIBS)
|
||||
$(LD_CC) $(LDFLAGS) -o $@ printers.o -L. -lcupscgi $(LIBS)
|
||||
|
||||
|
||||
#
|
||||
@@ -296,7 +296,7 @@ printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
|
||||
|
||||
testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(LIBZ) $(LIBGSSAPI)
|
||||
echo Testing CGI API...
|
||||
@@ -309,7 +309,7 @@ testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(LIBZ) $(LIBGSSAPI)
|
||||
echo Testing help index API...
|
||||
@@ -322,7 +322,7 @@ testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/$(LIBCUPSSTATIC) \
|
||||
$(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_CGI_H_
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_HELP_INDEX_H_
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -271,7 +271,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
section = n->section;
|
||||
}
|
||||
|
||||
if (!topic || strcmp(n->section, topic))
|
||||
if (!topic || !n->section || strcmp(n->section, topic))
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -91,7 +91,7 @@ cgiFormEncode(char *dst, /* I - Destination string */
|
||||
for (dstptr = dst; *src && dstptr < dstend;)
|
||||
{
|
||||
switch (*src)
|
||||
{
|
||||
{
|
||||
case ' ' :
|
||||
/*
|
||||
* Encode spaces with a "+"...
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
#include "cgi-private.h"
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include ../Makedefs
|
||||
|
||||
@@ -134,3 +134,49 @@ WebInterface @CUPS_WEBIF@
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
</Policy>
|
||||
|
||||
# Set the kerberized printer/job policies...
|
||||
<Policy kerberos>
|
||||
# Job/subscription privacy...
|
||||
JobPrivateAccess default
|
||||
JobPrivateValues default
|
||||
SubscriptionPrivateAccess default
|
||||
SubscriptionPrivateValues default
|
||||
|
||||
# Job-related operations must be done by the owner or an administrator...
|
||||
<Limit Create-Job Print-Job Print-URI Validate-Job>
|
||||
AuthType Negotiate
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
|
||||
<Limit Send-Document Send-URI 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-Get-Document>
|
||||
AuthType Negotiate
|
||||
Require user @OWNER @SYSTEM
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
|
||||
# All administration operations require an administrator to authenticate...
|
||||
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
|
||||
AuthType Default
|
||||
Require user @SYSTEM
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
|
||||
# All printer operations require a printer operator to authenticate...
|
||||
<Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>
|
||||
AuthType Default
|
||||
Require user @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
|
||||
# Only the owner or an administrator can cancel or authenticate a job...
|
||||
<Limit Cancel-Job CUPS-Authenticate-Job>
|
||||
AuthType Negotiate
|
||||
Require user @OWNER @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
|
||||
<Limit All>
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
</Policy>
|
||||
|
||||
+12
-17
@@ -1,20 +1,18 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
|
||||
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
|
||||
# reflects your local configuration changes.
|
||||
#
|
||||
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
|
||||
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
|
||||
# reflects your local configuration changes.
|
||||
# Base MIME conversions file for CUPS.
|
||||
#
|
||||
# Base MIME conversions file for CUPS.
|
||||
# Copyright 2007-2016 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# Copyright 2007-2011 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
########################################################################
|
||||
@@ -47,6 +45,7 @@ application/postscript application/vnd.cups-postscript 66 pstops
|
||||
|
||||
# PWG Raster filter for IPP Everywhere...
|
||||
application/vnd.cups-raster image/pwg-raster 100 rastertopwg
|
||||
application/vnd.cups-raster image/urf 100 rastertopwg
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -57,7 +56,3 @@ application/vnd.cups-raster image/pwg-raster 100 rastertopwg
|
||||
#
|
||||
|
||||
@DEFAULT_RAW_PRINTING@application/octet-stream application/vnd.cups-raw 0 -
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
||||
+3
-14
@@ -1,13 +1,11 @@
|
||||
#
|
||||
# "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $"
|
||||
#
|
||||
# Base MIME types file for CUPS.
|
||||
#
|
||||
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
|
||||
# VERSIONS OF CUPS. Instead, create a "local.types" file that
|
||||
# reflects your local configuration changes.
|
||||
#
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -81,12 +79,6 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
|
||||
(contains(0,4096,<0a>%!) + \
|
||||
!contains(0,4096,"ENTER LANGUAGE")))
|
||||
|
||||
application/g-code gcode
|
||||
application/sla stl string(0,"solid ") + contains(0,4096,"facet") + contains(0,4096,"vertex")
|
||||
application/vnd.makerbot-s3g x3g
|
||||
model/amf amf
|
||||
model/vnd.collada+xml dae
|
||||
|
||||
|
||||
########################################################################
|
||||
#
|
||||
@@ -114,6 +106,7 @@ image/x-xpixmap xpm ascii(0,1024) + string(3,"XPM")
|
||||
image/x-sun-raster ras string(0,<59a66a95>)
|
||||
|
||||
#image/fpx fpx
|
||||
image/urf urf string(0,UNIRAST<00>)
|
||||
image/x-alias pix short(8,8) short(8,24)
|
||||
image/x-bitmap bmp string(0,BM) + !printable(2,14)
|
||||
image/x-icon ico
|
||||
@@ -132,7 +125,7 @@ application/x-shell sh printable(0,1024) + string(0,#!) +\
|
||||
contains(2,80,/sh) contains(2,80,/zsh))
|
||||
application/x-csource c cxx cpp cc C h hpp \
|
||||
printable(0,1024) + ! css + \
|
||||
(string(0,/*) string(0,//)
|
||||
(string(0,/*) string(0,//) \
|
||||
string(0,#include) contains(0,1024,<0a>#include) \
|
||||
string(0,#define) contains(0,1024,<0a>#define))
|
||||
text/html html htm printable(0,1024) +\
|
||||
@@ -176,7 +169,3 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
|
||||
#
|
||||
|
||||
application/octet-stream
|
||||
|
||||
#
|
||||
# End of "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $".
|
||||
#
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2016 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Set the name of the config header file...
|
||||
@@ -45,6 +45,7 @@ AC_PATH_PROG(CHMOD,chmod)
|
||||
AC_PATH_PROG(GZIP,gzip)
|
||||
AC_PATH_PROG(LD,ld)
|
||||
AC_PATH_PROG(LN,ln)
|
||||
AC_PATH_PROG(MKDIR,mkdir)
|
||||
AC_PATH_PROG(MV,mv)
|
||||
AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(RMDIR,rmdir)
|
||||
@@ -129,7 +130,6 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
|
||||
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
|
||||
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
|
||||
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
|
||||
AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
|
||||
|
||||
dnl Checks for iconv.h and iconv_open
|
||||
AC_CHECK_HEADER(iconv.h,
|
||||
@@ -162,7 +162,7 @@ AC_CHECK_FUNCS(statfs statvfs)
|
||||
|
||||
dnl Checks for string functions.
|
||||
AC_CHECK_FUNCS(strdup strlcat strlcpy)
|
||||
if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
|
||||
if test "$host_os_name" = "hp-ux" -a "$host_os_version" = "1020"; then
|
||||
echo Forcing snprintf emulation for HP-UX.
|
||||
else
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf)
|
||||
@@ -181,8 +181,8 @@ dnl Check for vsyslog function.
|
||||
AC_CHECK_FUNCS(vsyslog)
|
||||
|
||||
dnl Checks for signal functions.
|
||||
case "$uname" in
|
||||
Linux | GNU)
|
||||
case "$host_os_name" in
|
||||
linux* | gnu*)
|
||||
# Do not use sigset on Linux or GNU HURD
|
||||
;;
|
||||
*)
|
||||
@@ -230,7 +230,7 @@ AC_SUBST(LIBUSB)
|
||||
AC_SUBST(USBQUIRKS)
|
||||
|
||||
if test "x$PKGCONFIG" != x; then
|
||||
if test x$enable_libusb != xno -a $uname != Darwin; then
|
||||
if test x$enable_libusb != xno -a $host_os_name != darwin; then
|
||||
AC_MSG_CHECKING(for libusb-1.0)
|
||||
if $PKGCONFIG --exists libusb-1.0; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -278,8 +278,8 @@ AC_SUBST(INSTALL_GZIP)
|
||||
AC_SUBST(LIBZ)
|
||||
|
||||
dnl Flags for "ar" command...
|
||||
case $uname in
|
||||
Darwin* | *BSD*)
|
||||
case $host_os_name in
|
||||
darwin* | *bsd*)
|
||||
ARFLAGS="-rcv"
|
||||
;;
|
||||
*)
|
||||
@@ -306,7 +306,7 @@ fi
|
||||
LIBS="$SAVELIBS"
|
||||
|
||||
dnl Check for DBUS support
|
||||
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
|
||||
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
|
||||
AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
|
||||
DBUSDIR="$withval")
|
||||
|
||||
@@ -314,7 +314,7 @@ DBUSDIR=""
|
||||
DBUS_NOTIFIER=""
|
||||
DBUS_NOTIFIERLIBS=""
|
||||
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then
|
||||
AC_MSG_CHECKING(for DBUS)
|
||||
if $PKGCONFIG --exists dbus-1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -348,8 +348,8 @@ CUPS_DEFAULT_SYSTEM_AUTHKEY=""
|
||||
CUPS_SYSTEM_AUTHKEY=""
|
||||
INSTALLXPC=""
|
||||
|
||||
case $uname in
|
||||
Darwin*)
|
||||
case $host_os_name in
|
||||
darwin*)
|
||||
BACKLIBS="$BACKLIBS -framework IOKit"
|
||||
SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices"
|
||||
LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS"
|
||||
@@ -389,28 +389,23 @@ case $uname in
|
||||
if test "x$default_adminkey" != xdefault; then
|
||||
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
|
||||
CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
|
||||
elif grep -q system.print.operator /etc/authorization; then
|
||||
else
|
||||
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
|
||||
CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
|
||||
else
|
||||
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
|
||||
CUPS_DEFAULT_SYSTEM_AUTHKEY="system.preferences"
|
||||
fi
|
||||
|
||||
if test "x$default_operkey" != xdefault; then
|
||||
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin"
|
||||
elif grep -q system.print.operator /etc/authorization; then
|
||||
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
|
||||
else
|
||||
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
|
||||
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
|
||||
fi])
|
||||
AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
|
||||
|
||||
dnl Check for sandbox/Seatbelt support
|
||||
if test $uversion -ge 100; then
|
||||
if test $host_os_version -ge 100; then
|
||||
AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
|
||||
fi
|
||||
if test $uversion -ge 110 -a $uversion -lt 120; then
|
||||
if test $host_os_version -ge 110 -a $host_os_version -lt 120; then
|
||||
# Broken public headers in 10.7.x...
|
||||
AC_MSG_CHECKING(for sandbox/private.h presence)
|
||||
if test -f /usr/local/include/sandbox/private.h; then
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Clear the debugging and non-shared library options unless the user asks
|
||||
@@ -46,6 +46,10 @@ fi
|
||||
|
||||
dnl Unit tests take up time during a compile...
|
||||
if test x$enable_unit_tests = xyes; then
|
||||
if test "$build" != "$host"; then
|
||||
AC_MSG_ERROR([Sorry, cannot build unit tests when cross-compiling.])
|
||||
fi
|
||||
|
||||
UNITTESTS="unittests"
|
||||
else
|
||||
UNITTESTS=""
|
||||
@@ -63,7 +67,7 @@ else
|
||||
fi
|
||||
|
||||
if test -z "$with_ldarchflags"; then
|
||||
if test "$uname" = Darwin; then
|
||||
if test "$host_os_name" = darwin; then
|
||||
# Only create Intel programs by default
|
||||
LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`"
|
||||
else
|
||||
@@ -130,8 +134,8 @@ if test -n "$GCC"; then
|
||||
# Not available to LSB binaries...
|
||||
AC_MSG_CHECKING(whether compiler supports -fPIE)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
CFLAGS="$CFLAGS -fPIE -Wl,-pie"
|
||||
AC_TRY_COMPILE(,,[
|
||||
PIEFLAGS="-fPIE -Wl,-pie"
|
||||
@@ -181,14 +185,23 @@ if test -n "$GCC"; then
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports -Wno-format-truncation)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wno-format-truncation"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
# Additional warning options for development testing...
|
||||
if test -d .svn; then
|
||||
OPTIM="-Werror $OPTIM"
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
# -D_FORTIFY_SOURCE=2 adds additional object size
|
||||
# checking, basically wrapping all string functions
|
||||
# with buffer-limited ones. Not strictly needed for
|
||||
@@ -197,7 +210,7 @@ if test -n "$GCC"; then
|
||||
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
|
||||
;;
|
||||
|
||||
Linux*)
|
||||
linux*)
|
||||
# The -z relro option is provided by the Linux linker command to
|
||||
# make relocatable data read-only.
|
||||
if test x$enable_relro = xyes; then
|
||||
@@ -207,8 +220,8 @@ if test -n "$GCC"; then
|
||||
esac
|
||||
else
|
||||
# Add vendor-specific compiler options...
|
||||
case $uname in
|
||||
SunOS*)
|
||||
case $host_os_name in
|
||||
sunos*)
|
||||
# Solaris
|
||||
if test -z "$OPTIM"; then
|
||||
if test "x$with_optim" = x; then
|
||||
@@ -235,8 +248,8 @@ else
|
||||
fi
|
||||
|
||||
# Add general compiler options per platform...
|
||||
case $uname in
|
||||
Linux*)
|
||||
case $host_os_name in
|
||||
linux*)
|
||||
# glibc 2.8 and higher breaks peer credentials unless you
|
||||
# define _GNU_SOURCE...
|
||||
OPTIM="$OPTIM -D_GNU_SOURCE"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Default languages...
|
||||
@@ -22,10 +22,10 @@ AC_ARG_WITH(languages, [ --with-languages set installed languages, defau
|
||||
esac])
|
||||
AC_SUBST(LANGUAGES)
|
||||
|
||||
dnl OS X bundle-based localization support
|
||||
AC_ARG_WITH(bundledir, [ --with-bundledir set OS X localization bundle directory ],
|
||||
dnl macOS bundle-based localization support
|
||||
AC_ARG_WITH(bundledir, [ --with-bundledir set macOS localization bundle directory ],
|
||||
CUPS_BUNDLEDIR="$withval",
|
||||
if test "x$uname" = xDarwin -a $uversion -ge 100; then
|
||||
if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then
|
||||
CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
|
||||
LANGUAGES=""
|
||||
else
|
||||
@@ -37,21 +37,41 @@ if test "x$CUPS_BUNDLEDIR" != x; then
|
||||
AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
|
||||
fi
|
||||
|
||||
dnl Default executable file permissions
|
||||
AC_ARG_WITH(exe_file_perm, [ --with-exe-file-perm set default executable permissions value, default=0555],
|
||||
CUPS_EXE_FILE_PERM="$withval",
|
||||
[case "$host_os_name" in
|
||||
linux* | gnu*)
|
||||
CUPS_EXE_FILE_PERM="755"
|
||||
;;
|
||||
*)
|
||||
CUPS_EXE_FILE_PERM="555"
|
||||
;;
|
||||
esac])
|
||||
AC_SUBST(CUPS_EXE_FILE_PERM)
|
||||
|
||||
dnl Default ConfigFilePerm
|
||||
AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640],
|
||||
CUPS_CONFIG_FILE_PERM="$withval",
|
||||
if test "x$uname" = xDarwin; then
|
||||
[if test "x$host_os_name" = xdarwin; then
|
||||
CUPS_CONFIG_FILE_PERM="644"
|
||||
else
|
||||
CUPS_CONFIG_FILE_PERM="640"
|
||||
fi)
|
||||
fi])
|
||||
AC_SUBST(CUPS_CONFIG_FILE_PERM)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM)
|
||||
|
||||
dnl Default permissions for cupsd
|
||||
AC_ARG_WITH(cupsd_file_perm, [ --with-cupsd-file-perm set default cupsd permissions, default=0500],
|
||||
CUPS_CUPSD_FILE_PERM="$withval",
|
||||
CUPS_CUPSD_FILE_PERM="500")
|
||||
[case "$host_os_name" in
|
||||
linux* | gnu*)
|
||||
CUPS_CUPSD_FILE_PERM="700"
|
||||
;;
|
||||
*)
|
||||
CUPS_CUPSD_FILE_PERM="500"
|
||||
;;
|
||||
esac])
|
||||
AC_SUBST(CUPS_CUPSD_FILE_PERM)
|
||||
|
||||
dnl Default LogFilePerm
|
||||
@@ -141,7 +161,7 @@ dnl Determine the correct username and group for this OS...
|
||||
AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
|
||||
CUPS_USER="$withval",
|
||||
AC_MSG_CHECKING(for default print user)
|
||||
if test x$uname = xDarwin; then
|
||||
if test x$host_os_name = xdarwin; then
|
||||
if test x`id -u _lp 2>/dev/null` = x; then
|
||||
CUPS_USER="lp";
|
||||
else
|
||||
@@ -174,7 +194,7 @@ fi
|
||||
AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
|
||||
CUPS_GROUP="$withval",
|
||||
AC_MSG_CHECKING(for default print group)
|
||||
if test x$uname = xDarwin; then
|
||||
if test x$host_os_name = xdarwin; then
|
||||
if test x`id -g _lp 2>/dev/null` = x; then
|
||||
CUPS_GROUP="lp";
|
||||
else
|
||||
@@ -207,7 +227,7 @@ fi
|
||||
|
||||
AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS],
|
||||
CUPS_SYSTEM_GROUPS="$withval",
|
||||
if test x$uname = xDarwin; then
|
||||
if test x$host_os_name = xdarwin; then
|
||||
CUPS_SYSTEM_GROUPS="admin"
|
||||
else
|
||||
AC_MSG_CHECKING(for default system groups)
|
||||
@@ -260,15 +280,15 @@ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
|
||||
|
||||
if test x$default_printcap != xno; then
|
||||
if test "x$default_printcap" = "xdefault"; then
|
||||
case $uname in
|
||||
Darwin*)
|
||||
if test $uversion -ge 90; then
|
||||
case $host_os_name in
|
||||
darwin*)
|
||||
if test $host_os_version -ge 90; then
|
||||
CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
|
||||
else
|
||||
CUPS_DEFAULT_PRINTCAP="/etc/printcap"
|
||||
fi
|
||||
;;
|
||||
SunOS*)
|
||||
sunos*)
|
||||
CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
|
||||
;;
|
||||
*)
|
||||
@@ -292,8 +312,8 @@ AC_ARG_WITH(lpdconfigfile, [ --with-lpdconfigfile set default LPDConfigFile
|
||||
|
||||
if test x$default_lpdconfigfile != xno; then
|
||||
if test "x$default_lpdconfigfile" = "xdefault"; then
|
||||
case $uname in
|
||||
Darwin*)
|
||||
case $host_os_name in
|
||||
darwin*)
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
|
||||
;;
|
||||
*)
|
||||
@@ -360,7 +380,7 @@ AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, def
|
||||
else
|
||||
CUPS_SNMP_ADDRESS="Address $withval"
|
||||
fi,
|
||||
if test "x$uname" = xDarwin; then
|
||||
if test "x$host_os_name" = xdarwin; then
|
||||
CUPS_SNMP_ADDRESS=""
|
||||
else
|
||||
CUPS_SNMP_ADDRESS="Address @LOCAL"
|
||||
@@ -382,7 +402,7 @@ AC_SUBST(DEFAULT_IPP_PORT)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
|
||||
|
||||
dnl Web interface...
|
||||
AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for OS X])
|
||||
AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for macOS])
|
||||
case "x$enable_webif" in
|
||||
xno)
|
||||
CUPS_WEBIF=No
|
||||
@@ -393,7 +413,7 @@ case "x$enable_webif" in
|
||||
CUPS_DEFAULT_WEBIF=1
|
||||
;;
|
||||
*)
|
||||
if test $uname = Darwin; then
|
||||
if test $host_os_name = darwin; then
|
||||
CUPS_WEBIF=No
|
||||
CUPS_DEFAULT_WEBIF=0
|
||||
else
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_PREFIX_DEFAULT(/)
|
||||
@@ -74,7 +74,7 @@ fi
|
||||
dnl Fix "localstatedir" variable if it hasn't been specified...
|
||||
if test "$localstatedir" = "\${prefix}/var"; then
|
||||
if test "$prefix" = "/"; then
|
||||
if test "$uname" = Darwin; then
|
||||
if test "$host_os_name" = darwin; then
|
||||
localstatedir="/private/var"
|
||||
else
|
||||
localstatedir="/var"
|
||||
@@ -87,7 +87,7 @@ fi
|
||||
dnl Fix "sysconfdir" variable if it hasn't been specified...
|
||||
if test "$sysconfdir" = "\${prefix}/etc"; then
|
||||
if test "$prefix" = "/"; then
|
||||
if test "$uname" = Darwin; then
|
||||
if test "$host_os_name" = darwin; then
|
||||
sysconfdir="/private/etc"
|
||||
else
|
||||
sysconfdir="/etc"
|
||||
@@ -99,8 +99,8 @@ fi
|
||||
|
||||
dnl Fix "libdir" variable...
|
||||
if test "$libdir" = "\${exec_prefix}/lib"; then
|
||||
case "$uname" in
|
||||
Linux*)
|
||||
case "$host_os_name" in
|
||||
linux*)
|
||||
if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
|
||||
libdir="$exec_prefix/lib64"
|
||||
fi
|
||||
@@ -165,7 +165,7 @@ dnl Setup default locations...
|
||||
AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
|
||||
|
||||
if test x$cachedir = x; then
|
||||
if test "x$uname" = xDarwin; then
|
||||
if test "x$host_os_name" = xdarwin; then
|
||||
CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
|
||||
else
|
||||
CUPS_CACHEDIR="$localstatedir/cache/cups"
|
||||
@@ -230,8 +230,8 @@ AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
|
||||
|
||||
# Locale data
|
||||
if test "$localedir" = "\${datarootdir}/locale"; then
|
||||
case "$uname" in
|
||||
Linux | GNU | *BSD* | Darwin*)
|
||||
case "$host_os_name" in
|
||||
linux* | gnu* | *bsd* | darwin*)
|
||||
CUPS_LOCALEDIR="$datarootdir/locale"
|
||||
;;
|
||||
|
||||
@@ -265,9 +265,9 @@ AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
|
||||
AC_SUBST(CUPS_REQUESTS)
|
||||
|
||||
# Server executables...
|
||||
case "$uname" in
|
||||
*BSD* | Darwin*)
|
||||
# *BSD and Darwin (MacOS X)
|
||||
case "$host_os_name" in
|
||||
*bsd* | darwin*)
|
||||
# *BSD and Darwin (macOS)
|
||||
INSTALL_SYSV=""
|
||||
CUPS_SERVERBIN="$exec_prefix/libexec/cups"
|
||||
;;
|
||||
@@ -289,9 +289,9 @@ AC_SUBST(CUPS_SERVERROOT)
|
||||
|
||||
# Transient run-time state
|
||||
AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin (OS X)
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
# Darwin (macOS)
|
||||
CUPS_STATEDIR="$CUPS_SERVERROOT"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(avahi, [ --disable-avahi disable DNS Service Discovery support using Avahi])
|
||||
@@ -24,7 +24,7 @@ DNSSD_BACKEND=""
|
||||
IPPFIND_BIN=""
|
||||
IPPFIND_MAN=""
|
||||
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$host_os_name != xdarwin; then
|
||||
AC_MSG_CHECKING(for Avahi)
|
||||
if $PKGCONFIG --exists avahi-client; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -41,9 +41,9 @@ fi
|
||||
|
||||
if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
|
||||
AC_CHECK_HEADER(dns_sd.h, [
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin and MacOS X...
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
# Darwin and macOS...
|
||||
AC_DEFINE(HAVE_DNSSD)
|
||||
DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
|
||||
DNSSD_BACKEND="dnssd"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dnl
|
||||
dnl GSSAPI/Kerberos library detection for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 2006-2007 by Easy Software Products.
|
||||
dnl
|
||||
dnl This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -11,7 +11,7 @@ dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(gssapi, [ --disable-gssapi disable GSSAPI support])
|
||||
@@ -22,9 +22,9 @@ AC_SUBST(LIBGSSAPI)
|
||||
if test x$enable_gssapi != xno; then
|
||||
AC_PATH_TOOL(KRB5CONFIG, krb5-config)
|
||||
if test "x$KRB5CONFIG" != x; then
|
||||
case "$uname" in
|
||||
Darwin)
|
||||
# OS X weak-links to the Kerberos framework...
|
||||
case "$host_os_name" in
|
||||
darwin)
|
||||
# macOS weak-links to the Kerberos framework...
|
||||
LIBGSSAPI="-weak_framework Kerberos"
|
||||
AC_MSG_CHECKING(for GSS framework)
|
||||
if test -d /System/Library/Frameworks/GSS.framework; then
|
||||
@@ -34,7 +34,7 @@ if test x$enable_gssapi != xno; then
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
SunOS*)
|
||||
sunos*)
|
||||
# Solaris has a non-standard krb5-config, don't use it!
|
||||
AC_CHECK_LIB(gss, gss_display_status,
|
||||
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
|
||||
@@ -52,13 +52,13 @@ if test x$enable_gssapi != xno; then
|
||||
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
|
||||
else
|
||||
# Check for vendor-specific implementations...
|
||||
case "$uname" in
|
||||
HP-UX*)
|
||||
case "$host_os_name" in
|
||||
hp-ux*)
|
||||
AC_CHECK_LIB(gss, gss_display_status,
|
||||
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
|
||||
LIBGSSAPI="-lgss -lgssapi_krb5")
|
||||
;;
|
||||
SunOS*)
|
||||
sunos*)
|
||||
AC_CHECK_LIB(gss, gss_display_status,
|
||||
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
|
||||
LIBGSSAPI="-lgss")
|
||||
|
||||
@@ -8,7 +8,7 @@ dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Check for largefile support...
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
dnl
|
||||
dnl Libtool stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2011 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported
|
||||
AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported=/path/to/libtool
|
||||
build with libtool (UNSUPPORTED!)],
|
||||
[if test x$enable_libtool_unsupported != xno; then
|
||||
if test x$enable_libtool_unsupported == xyes; then
|
||||
AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.])
|
||||
fi
|
||||
LIBTOOL="$enable_libtool_unsupported"
|
||||
enable_shared=no
|
||||
echo "WARNING: libtool is not supported or endorsed by Apple Inc."
|
||||
@@ -22,12 +25,40 @@ AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported
|
||||
LIBTOOL=""
|
||||
fi])
|
||||
|
||||
AC_SUBST(LIBTOOL)
|
||||
|
||||
if test x$LIBTOOL != x; then
|
||||
DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
|
||||
DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
|
||||
|
||||
LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
|
||||
LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
|
||||
|
||||
LIBCUPS="libcups.la"
|
||||
LIBCUPSSTATIC="libcups.la"
|
||||
LIBCUPSCGI="libcupscgi.la"
|
||||
LIBCUPSIMAGE="libcupsimage.la"
|
||||
LIBCUPSMIME="libcupsmime.la"
|
||||
LIBCUPSPPDC="libcupsppdc.la"
|
||||
|
||||
LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
|
||||
LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
|
||||
LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
|
||||
|
||||
LINKCUPS="../cups/\$(LIBCUPS)"
|
||||
LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
|
||||
DSO="\$(CC)"
|
||||
|
||||
else
|
||||
LD_CC="\$(CC)"
|
||||
LD_CXX="\$(CXX)"
|
||||
|
||||
LIBTOOL_CC=""
|
||||
LIBTOOL_CXX=""
|
||||
LIBTOOL_INSTALL=""
|
||||
fi
|
||||
|
||||
AC_SUBST(LD_CC)
|
||||
AC_SUBST(LD_CXX)
|
||||
|
||||
AC_SUBST(LIBTOOL)
|
||||
AC_SUBST(LIBTOOL_CC)
|
||||
AC_SUBST(LIBTOOL_CXX)
|
||||
AC_SUBST(LIBTOOL_INSTALL)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Manpage stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Fix "mandir" variable...
|
||||
@@ -19,9 +19,9 @@ if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
|
||||
fi
|
||||
|
||||
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
|
||||
case "$uname" in
|
||||
Darwin* | Linux | GNU | *BSD*)
|
||||
# Darwin, MacOS X, Linux, GNU HURD, and *BSD
|
||||
case "$host_os_name" in
|
||||
darwin* | linux* | gnu* | *bsd*)
|
||||
# Darwin, macOS, Linux, GNU HURD, and *BSD
|
||||
mandir="/usr/share/man"
|
||||
AMANDIR="/usr/share/man"
|
||||
PMANDIR="/usr/share/man"
|
||||
@@ -42,8 +42,8 @@ AC_SUBST(AMANDIR)
|
||||
AC_SUBST(PMANDIR)
|
||||
|
||||
dnl Setup manpage extensions...
|
||||
case "$uname" in
|
||||
SunOS*)
|
||||
case "$host_os_name" in
|
||||
sunos*)
|
||||
# Solaris
|
||||
MAN1EXT=1
|
||||
MAN5EXT=5
|
||||
@@ -51,8 +51,8 @@ case "$uname" in
|
||||
MAN8EXT=1m
|
||||
MAN8DIR=1m
|
||||
;;
|
||||
Linux* | GNU* | Darwin*)
|
||||
# Linux, GNU Hurd, and OS X
|
||||
linux* | gnu* | darwin*)
|
||||
# Linux, GNU Hurd, and macOS
|
||||
MAN1EXT=1.gz
|
||||
MAN5EXT=5.gz
|
||||
MAN7EXT=7.gz
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2016 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
|
||||
@@ -28,7 +28,7 @@ AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
|
||||
|
||||
# Tru64 5.1b leaks file descriptors with these functions; disable until
|
||||
# we can come up with a test for this...
|
||||
if test "$uname" != "OSF1"; then
|
||||
if test "$host_os_name" != "osf1"; then
|
||||
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
|
||||
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
|
||||
fi
|
||||
@@ -45,9 +45,9 @@ AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name
|
||||
|
||||
if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
|
||||
if test "x$default_domainsocket" = x; then
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin and MaxOS X do their own thing...
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
# Darwin and macOS do their own thing...
|
||||
CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
dnl
|
||||
dnl Operating system stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Get the operating system, version number, and architecture...
|
||||
uname=`uname`
|
||||
uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'`
|
||||
uarch=`uname -m`
|
||||
dnl Get the build and host platforms and split the host_os value
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
uname="Darwin"
|
||||
if test $uversion -lt 120; then
|
||||
AC_MSG_ERROR([Sorry, this version of CUPS requires OS X 10.8 or higher.])
|
||||
fi
|
||||
;;
|
||||
[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`]
|
||||
[host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`]
|
||||
# Linux often does not yield an OS version we can use...
|
||||
if test "x$host_os_version" = x; then
|
||||
host_os_version="0"
|
||||
fi
|
||||
|
||||
GNU* | GNU/*)
|
||||
uname="GNU"
|
||||
;;
|
||||
Linux*)
|
||||
uname="Linux"
|
||||
;;
|
||||
esac
|
||||
if test "$host_os_name" = darwin -a $host_os_version -lt 120; then
|
||||
AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.])
|
||||
fi
|
||||
|
||||
dnl Determine whether we are cross-compiling...
|
||||
if test "$build" = "$host"; then
|
||||
# No, build local targets
|
||||
LOCALTARGET="local"
|
||||
else
|
||||
# Yes, don't build local targets
|
||||
LOCALTARGET=""
|
||||
fi
|
||||
AC_SUBST(LOCALTARGET)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
dnl
|
||||
dnl PAM stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(pam, [ --disable-pam disable PAM support])
|
||||
AC_ARG_WITH(pam_module, [ --with-pam-module specify the PAM module to use])
|
||||
AC_ARG_WITH(pam_module, [ --with-pam-module set the PAM module to use])
|
||||
|
||||
PAMDIR=""
|
||||
PAMFILE="pam.std"
|
||||
@@ -52,9 +52,9 @@ if test x$enable_pam != xno; then
|
||||
|
||||
LIBS="$SAVELIBS"
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin/OS X
|
||||
case "$host_os_name" in
|
||||
darwin*)
|
||||
# Darwin/macOS
|
||||
if test "x$with_pam_module" != x; then
|
||||
PAMFILE="pam.$with_pam_module"
|
||||
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
|
||||
|
||||
@@ -8,7 +8,7 @@ dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL))
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
dnl
|
||||
dnl Scripting configuration stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2010 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl Do we have Java?
|
||||
AC_ARG_WITH(java, [ --with-java set Java interpreter for web interfaces ],
|
||||
CUPS_JAVA="$withval",
|
||||
CUPS_JAVA="")
|
||||
CUPS_JAVA="auto")
|
||||
|
||||
if test "x$CUPS_JAVA" = x; then
|
||||
if test "x$CUPS_JAVA" = xauto; then
|
||||
AC_PATH_PROG(JAVA,java)
|
||||
CUPS_JAVA="$JAVA"
|
||||
elif test "x$CUPS_JAVA" = xno; then
|
||||
CUPS_JAVA=""
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA")
|
||||
@@ -30,11 +32,13 @@ fi
|
||||
dnl Do we have Perl?
|
||||
AC_ARG_WITH(perl, [ --with-perl set Perl interpreter for web interfaces ],
|
||||
CUPS_PERL="$withval",
|
||||
CUPS_PERL="")
|
||||
CUPS_PERL="auto")
|
||||
|
||||
if test "x$CUPS_PERL" = x; then
|
||||
if test "x$CUPS_PERL" = xauto; then
|
||||
AC_PATH_PROG(PERL,perl)
|
||||
CUPS_PERL="$PERL"
|
||||
elif test "x$CUPS_PERL" = xno; then
|
||||
CUPS_PERL=""
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL")
|
||||
@@ -46,9 +50,9 @@ fi
|
||||
dnl Do we have PHP?
|
||||
AC_ARG_WITH(php, [ --with-php set PHP interpreter for web interfaces ],
|
||||
CUPS_PHP="$withval",
|
||||
CUPS_PHP="")
|
||||
CUPS_PHP="auto")
|
||||
|
||||
if test "x$CUPS_PHP" = x; then
|
||||
if test "x$CUPS_PHP" = xauto; then
|
||||
AC_PATH_PROG(PHPCGI,php-cgi)
|
||||
if test "x$PHPCGI" = x; then
|
||||
AC_PATH_PROG(PHP,php)
|
||||
@@ -56,6 +60,8 @@ if test "x$CUPS_PHP" = x; then
|
||||
else
|
||||
CUPS_PHP="$PHPCGI"
|
||||
fi
|
||||
elif test "x$CUPS_PHP" = xno; then
|
||||
CUPS_PHP=""
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP")
|
||||
@@ -69,11 +75,13 @@ fi
|
||||
dnl Do we have Python?
|
||||
AC_ARG_WITH(python, [ --with-python set Python interpreter for web interfaces ],
|
||||
CUPS_PYTHON="$withval",
|
||||
CUPS_PYTHON="")
|
||||
CUPS_PYTHON="auto")
|
||||
|
||||
if test "x$CUPS_PYTHON" = x; then
|
||||
if test "x$CUPS_PYTHON" = xauto; then
|
||||
AC_PATH_PROG(PYTHON,python)
|
||||
CUPS_PYTHON="$PYTHON"
|
||||
elif test "x$CUPS_PYTHON" = xno; then
|
||||
CUPS_PYTHON=""
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Shared library support for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
PICFLAG=1
|
||||
@@ -21,8 +21,8 @@ LIBCUPSBASE="lib$cupsbase"
|
||||
LIBCUPSSTATIC="lib$cupsbase.a"
|
||||
|
||||
if test x$enable_shared != xno; then
|
||||
case "$uname" in
|
||||
SunOS*)
|
||||
case "$host_os_name" in
|
||||
sunos*)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
@@ -32,7 +32,7 @@ if test x$enable_shared != xno; then
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
|
||||
;;
|
||||
Linux | GNU | *BSD*)
|
||||
linux* | gnu* | *bsd*)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
@@ -42,7 +42,7 @@ if test x$enable_shared != xno; then
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
|
||||
;;
|
||||
Darwin*)
|
||||
darwin*)
|
||||
LIBCUPS="lib$cupsbase.2.dylib"
|
||||
LIBCUPSCGI="libcupscgi.1.dylib"
|
||||
LIBCUPSIMAGE="libcupsimage.2.dylib"
|
||||
@@ -120,8 +120,8 @@ if test "$DSO" != ":"; then
|
||||
# Tell the run-time linkers where to find a DSO. Some platforms
|
||||
# need this option, even when the library is installed in a
|
||||
# standard location...
|
||||
case $uname in
|
||||
SunOS*)
|
||||
case $host_os_name in
|
||||
sunos*)
|
||||
# Solaris...
|
||||
if test $exec_prefix != /usr; then
|
||||
DSOFLAGS="-R$libdir $DSOFLAGS"
|
||||
@@ -129,7 +129,7 @@ if test "$DSO" != ":"; then
|
||||
EXPORT_LDFLAGS="-R$libdir"
|
||||
fi
|
||||
;;
|
||||
*BSD*)
|
||||
*bsd*)
|
||||
# *BSD...
|
||||
if test $exec_prefix != /usr; then
|
||||
DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
|
||||
@@ -137,7 +137,7 @@ if test "$DSO" != ":"; then
|
||||
EXPORT_LDFLAGS="-Wl,-R$libdir"
|
||||
fi
|
||||
;;
|
||||
Linux | GNU)
|
||||
linux* | gnu*)
|
||||
# Linux, and HURD...
|
||||
if test $exec_prefix != /usr; then
|
||||
DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(ssl, [ --disable-ssl disable SSL/TLS support])
|
||||
@@ -23,7 +23,7 @@ CUPS_SERVERKEYCHAIN=""
|
||||
if test x$enable_ssl != xno; then
|
||||
dnl Look for CDSA...
|
||||
if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
|
||||
if test $uname = Darwin; then
|
||||
if test $host_os_name = darwin; then
|
||||
AC_CHECK_HEADER(Security/SecureTransport.h, [
|
||||
have_ssl=1
|
||||
AC_DEFINE(HAVE_SSL)
|
||||
@@ -52,7 +52,7 @@ if test x$enable_ssl != xno; then
|
||||
AC_DEFINE(HAVE_CSSMERRORSTRING)
|
||||
AC_DEFINE(HAVE_SECKEYCHAINOPEN)])
|
||||
|
||||
if test $uversion -ge 150; then
|
||||
if test $host_os_version -ge 150; then
|
||||
AC_DEFINE(HAVE_SSLSETENABLEDCIPHERS)
|
||||
fi
|
||||
fi
|
||||
@@ -61,7 +61,6 @@ if test x$enable_ssl != xno; then
|
||||
dnl Then look for GNU TLS...
|
||||
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
|
||||
AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
if $PKGCONFIG --exists gnutls; then
|
||||
have_ssl=1
|
||||
SSLLIBS=`$PKGCONFIG --libs gnutls`
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
ONDEMANDFLAGS=""
|
||||
@@ -16,30 +16,21 @@ ONDEMANDLIBS=""
|
||||
AC_SUBST(ONDEMANDFLAGS)
|
||||
AC_SUBST(ONDEMANDLIBS)
|
||||
|
||||
dnl Launchd is used on OS X/Darwin...
|
||||
dnl Launchd is used on macOS/Darwin...
|
||||
AC_ARG_ENABLE(launchd, [ --disable-launchd disable launchd support])
|
||||
LAUNCHD_DIR=""
|
||||
AC_SUBST(LAUNCHD_DIR)
|
||||
|
||||
if test x$enable_launchd != xno; then
|
||||
AC_CHECK_FUNC(launch_msg, AC_DEFINE(HAVE_LAUNCHD))
|
||||
if test $uversion -ge 140; then
|
||||
AC_CHECK_FUNC(launch_activate_socket, [
|
||||
AC_DEFINE(HAVE_LAUNCHD)
|
||||
AC_DEFINE(HAVE_LAUNCH_ACTIVATE_SOCKET)])
|
||||
fi
|
||||
AC_CHECK_FUNC(launch_activate_socket, [
|
||||
AC_DEFINE(HAVE_LAUNCHD)
|
||||
AC_DEFINE(HAVE_ONDEMAND)])
|
||||
AC_CHECK_HEADER(launch.h, AC_DEFINE(HAVE_LAUNCH_H))
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin, MacOS X
|
||||
LAUNCHD_DIR="/System/Library/LaunchDaemons"
|
||||
# liblaunch is already part of libSystem
|
||||
;;
|
||||
*)
|
||||
# All others; this test will need to be updated
|
||||
;;
|
||||
esac
|
||||
if test "$host_os_name" = darwin; then
|
||||
LAUNCHD_DIR="/System/Library/LaunchDaemons"
|
||||
# liblaunch is already part of libSystem
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Systemd is used on Linux...
|
||||
@@ -77,6 +68,7 @@ if test x$enable_systemd != xno; then
|
||||
|
||||
if test $have_systemd = yes; then
|
||||
AC_DEFINE(HAVE_SYSTEMD)
|
||||
AC_DEFINE(HAVE_ONDEMAND)
|
||||
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
|
||||
if test "x$SYSTEMD_DIR" = x; then
|
||||
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
|
||||
@@ -85,6 +77,16 @@ if test x$enable_systemd != xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Upstart is also used on Linux (e.g., Chrome OS)
|
||||
AC_ARG_ENABLE(upstart, [ --enable-upstart enable upstart support])
|
||||
if test "x$enable_upstart" = "xyes"; then
|
||||
if test "x$have_systemd" = "xyes"; then
|
||||
AC_MSG_ERROR(Cannot support both systemd and upstart.)
|
||||
fi
|
||||
AC_DEFINE(HAVE_UPSTART)
|
||||
AC_DEFINE(HAVE_ONDEMAND)
|
||||
fi
|
||||
|
||||
dnl Solaris uses smf
|
||||
SMFMANIFESTDIR=""
|
||||
AC_SUBST(SMFMANIFESTDIR)
|
||||
@@ -115,13 +117,13 @@ if test x$rcdir = x; then
|
||||
fi
|
||||
|
||||
if test "x$rcstart" = x; then
|
||||
case "$uname" in
|
||||
Linux | GNU | GNU/k*BSD*)
|
||||
case "$host_os_name" in
|
||||
linux* | gnu*)
|
||||
# Linux
|
||||
rcstart="81"
|
||||
;;
|
||||
|
||||
SunOS*)
|
||||
sunos*)
|
||||
# Solaris
|
||||
rcstart="81"
|
||||
;;
|
||||
@@ -134,8 +136,8 @@ if test "x$rcstart" = x; then
|
||||
fi
|
||||
|
||||
if test "x$rcstop" = x; then
|
||||
case "$uname" in
|
||||
Linux | GNU | GNU/k*BSD*)
|
||||
case "$host_os_name" in
|
||||
linux* | gnu*)
|
||||
# Linux
|
||||
rcstop="36"
|
||||
;;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
dnl
|
||||
dnl Threading stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2011 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE(threads, [ --disable-threads disable multi-threading support])
|
||||
@@ -36,7 +36,7 @@ if test "x$enable_threads" != xno; then
|
||||
|
||||
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
|
||||
# be POSIX-compliant... :(
|
||||
if test $uname = SunOS; then
|
||||
if test $host_os_name = sunos; then
|
||||
PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
fi
|
||||
break
|
||||
|
||||
+1568
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+19
-13
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_CONFIG_H_
|
||||
@@ -240,13 +240,6 @@
|
||||
#undef HAVE_VSYSLOG
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the ASL functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_ASL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the systemd journal functions?
|
||||
*/
|
||||
@@ -479,13 +472,19 @@
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have on-demand support (launchd/systemd/upstart)?
|
||||
*/
|
||||
|
||||
#undef HAVE_ONDEMAND
|
||||
|
||||
|
||||
/*
|
||||
* Do we have launchd support?
|
||||
*/
|
||||
|
||||
#undef HAVE_LAUNCH_H
|
||||
#undef HAVE_LAUNCHD
|
||||
#undef HAVE_LAUNCH_ACTIVATE_SOCKET
|
||||
|
||||
|
||||
/*
|
||||
@@ -495,6 +494,13 @@
|
||||
#undef HAVE_SYSTEMD
|
||||
|
||||
|
||||
/*
|
||||
* Do we have upstart support?
|
||||
*/
|
||||
|
||||
#undef HAVE_UPSTART
|
||||
|
||||
|
||||
/*
|
||||
* Various scripting languages...
|
||||
*/
|
||||
@@ -537,10 +543,10 @@
|
||||
*/
|
||||
|
||||
#undef HAVE_GETGROUPLIST
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Do we have OS X 10.4's mbr_XXX functions?
|
||||
* Do we have macOS 10.4's mbr_XXX functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_MEMBERSHIP_H
|
||||
@@ -686,7 +692,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* Location of OS X localization bundle, if any.
|
||||
* Location of macOS localization bundle, if any.
|
||||
*/
|
||||
|
||||
#undef CUPS_BUNDLEDIR
|
||||
|
||||
+1793
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+415
-265
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+3
-3
@@ -1,21 +1,21 @@
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2016 by Apple Inc.
|
||||
dnl Copyright 2007-2017 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl We need at least autoconf 2.60...
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
dnl Package name and version...
|
||||
AC_INIT([CUPS], [2.2b1], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
|
||||
AC_INIT([CUPS], [2.2.6], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
|
||||
|
||||
sinclude(config-scripts/cups-opsys.m4)
|
||||
sinclude(config-scripts/cups-common.m4)
|
||||
|
||||
@@ -261,6 +261,11 @@ testcache.o: testcache.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
thread-private.h
|
||||
testconflicts.o: testconflicts.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h pwg.h ppd.h raster.h string-private.h ../config.h
|
||||
testcreds.o: testcreds.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
testcups.o: testcups.c string-private.h ../config.h cups.h file.h \
|
||||
versioning.h ipp.h http.h array.h language.h pwg.h ppd.h raster.h
|
||||
testdest.o: testdest.c cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
|
||||
+68
-64
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# API library Makefile for CUPS.
|
||||
# Library Makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2016 by Apple Inc.
|
||||
# Copyright 2007-2017 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
# This file is subject to the Apple OS-Developed Software exception.
|
||||
#
|
||||
@@ -85,9 +85,11 @@ TESTOBJS = \
|
||||
testarray.o \
|
||||
testcache.o \
|
||||
testconflicts.o \
|
||||
testcreds.o \
|
||||
testcups.o \
|
||||
testdest.o \
|
||||
testfile.o \
|
||||
testgetdests.o \
|
||||
testhttp.o \
|
||||
testi18n.o \
|
||||
testipp.o \
|
||||
@@ -153,9 +155,11 @@ UNITTARGETS = \
|
||||
testarray \
|
||||
testcache \
|
||||
testconflicts \
|
||||
testcreds \
|
||||
testcups \
|
||||
testdest \
|
||||
testfile \
|
||||
testgetdests \
|
||||
testhttp \
|
||||
testi18n \
|
||||
testipp \
|
||||
@@ -342,7 +346,7 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
|
||||
libcups.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
-rpath $(LIBDIR) -version-info 2:12 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
@@ -365,7 +369,7 @@ libcups.a: $(LIBOBJS)
|
||||
libcups2.def: $(LIBOBJS) Makefile
|
||||
echo Generating $@...
|
||||
echo "LIBRARY libcups2" >libcups2.def
|
||||
echo "VERSION 2.11" >>libcups2.def
|
||||
echo "VERSION 2.12" >>libcups2.def
|
||||
echo "EXPORTS" >>libcups2.def
|
||||
(nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}'; \
|
||||
echo __cups_strcpy; echo __cups_strlcat; echo __cups_strlcpy) | \
|
||||
@@ -381,7 +385,7 @@ libcups2.def: $(LIBOBJS) Makefile
|
||||
|
||||
testadmin: testadmin.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testadmin.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testadmin.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -391,7 +395,7 @@ testadmin: testadmin.o $(LIBCUPSSTATIC)
|
||||
|
||||
testarray: testarray.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running array API tests...
|
||||
./testarray
|
||||
@@ -403,7 +407,7 @@ testarray: testarray.o $(LIBCUPSSTATIC)
|
||||
|
||||
testcache: testcache.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testcache.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testcache.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -413,7 +417,17 @@ testcache: testcache.o $(LIBCUPSSTATIC)
|
||||
|
||||
testconflicts: testconflicts.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testconflicts.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testconflicts.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# testcreds (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testcreds: testcreds.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcreds.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -423,7 +437,7 @@ testconflicts: testconflicts.o $(LIBCUPSSTATIC)
|
||||
|
||||
testcups: testcups.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testcups.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testcups.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -433,7 +447,7 @@ testcups: testcups.o $(LIBCUPSSTATIC)
|
||||
|
||||
testdest: testdest.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testdest.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testdest.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -443,19 +457,29 @@ testdest: testdest.o $(LIBCUPSSTATIC)
|
||||
|
||||
testfile: testfile.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running file API tests...
|
||||
./testfile
|
||||
|
||||
|
||||
#
|
||||
# testgetdests (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testgetdests: testgetdests.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testgetdests.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# testhttp (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testhttp: testhttp.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running HTTP API tests...
|
||||
./testhttp
|
||||
@@ -467,7 +491,7 @@ testhttp: testhttp.o $(LIBCUPSSTATIC)
|
||||
|
||||
testipp: testipp.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running IPP API tests...
|
||||
./testipp
|
||||
@@ -479,7 +503,7 @@ testipp: testipp.o $(LIBCUPSSTATIC)
|
||||
|
||||
testi18n: testi18n.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running internationalization API tests...
|
||||
./testi18n
|
||||
@@ -491,10 +515,22 @@ testi18n: testi18n.o $(LIBCUPSSTATIC)
|
||||
|
||||
testlang: testlang.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Creating locale directory structure...
|
||||
$(RM) -r locale
|
||||
$(MKDIR) locale/en
|
||||
echo 'msgid "No"' > locale/en/cups_en.po
|
||||
echo 'msgstr "No"' >> locale/en/cups_en.po
|
||||
echo 'msgid "Yes"' >> locale/en/cups_en.po
|
||||
echo 'msgstr "Yes"' >> locale/en/cups_en.po
|
||||
for po in ../locale/cups_*.po; do \
|
||||
lang=`basename $$po .po | sed -e '1,$$s/^cups_//'`; \
|
||||
$(MKDIR) locale/$$lang; \
|
||||
$(LN) ../../$$po locale/$$lang; \
|
||||
done
|
||||
echo Running language API tests...
|
||||
./testlang
|
||||
LOCALEDIR=locale ./testlang
|
||||
|
||||
|
||||
#
|
||||
@@ -503,7 +539,7 @@ testlang: testlang.o $(LIBCUPSSTATIC)
|
||||
|
||||
testoptions: testoptions.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running option API tests...
|
||||
./testoptions
|
||||
@@ -515,7 +551,7 @@ testoptions: testoptions.o $(LIBCUPSSTATIC)
|
||||
|
||||
testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running PPD API tests...
|
||||
./testppd
|
||||
@@ -527,7 +563,7 @@ testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd
|
||||
|
||||
testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testpwg.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testpwg.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running PWG API tests...
|
||||
./testpwg test.ppd
|
||||
@@ -539,7 +575,7 @@ testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd
|
||||
|
||||
testsnmp: testsnmp.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testsnmp.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(LDFLAGS) -o $@ testsnmp.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -549,7 +585,7 @@ testsnmp: testsnmp.o $(LIBCUPSSTATIC)
|
||||
|
||||
tlscheck: tlscheck.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ tlscheck.o $(LIBCUPSSTATIC) \
|
||||
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ tlscheck.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -559,56 +595,27 @@ tlscheck: tlscheck.o $(LIBCUPSSTATIC)
|
||||
|
||||
apihelp:
|
||||
echo Generating CUPS API help files...
|
||||
mxmldoc --section "Programming" \
|
||||
--title "Introduction to CUPS Programming" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-overview.header --intro api-overview.shtml \
|
||||
>../doc/help/api-overview.html
|
||||
$(RM) cupspm.xml
|
||||
mxmldoc --section "Programming" --body cupspm.md \
|
||||
cupspm.xml \
|
||||
auth.c cups.h dest*.c encode.c http.h http*.c ipp.h ipp*.c \
|
||||
options.c tls-darwin.c usersys.c util.c \
|
||||
--coverimage cupspm.png \
|
||||
--epub ../doc/help/cupspm.epub
|
||||
mxmldoc --section "Programming" --body cupspm.md \
|
||||
cupspm.xml > ../doc/help/cupspm.html
|
||||
$(RM) cupspm.xml
|
||||
mxmldoc --section "Programming" --title "Administration APIs" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-admin.header --intro api-admin.shtml \
|
||||
api-admin.xml \
|
||||
adminutil.c adminutil.h getdevices.c >../doc/help/api-admin.html
|
||||
mxmldoc --tokens help/api-admin.html api-admin.xml >../doc/help/api-admin.tokens
|
||||
$(RM) api-admin.xml
|
||||
mxmldoc --section "Programming" --title "Array API" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-array.header --intro api-array.shtml \
|
||||
api-array.xml \
|
||||
array.h array.c >../doc/help/api-array.html
|
||||
mxmldoc --tokens help/api-array.html api-array.xml >../doc/help/api-array.tokens
|
||||
$(RM) api-array.xml
|
||||
mxmldoc --section "Programming" --title "CUPS API" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
api-cups.xml \
|
||||
cups.h pwg.h adminutil.c dest*.c language.c notify.c \
|
||||
options.c pwg-media.c tempfile.c usersys.c \
|
||||
util.c >../doc/help/api-cups.html
|
||||
mxmldoc --tokens help/api-cups.html api-cups.xml >../doc/help/api-cups.tokens
|
||||
$(RM) api-cups.xml
|
||||
mxmldoc --section "Programming" --title "File and Directory APIs" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-filedir.header --intro api-filedir.shtml \
|
||||
api-filedir.xml \
|
||||
file.h file.c dir.h dir.c >../doc/help/api-filedir.html
|
||||
mxmldoc --tokens api-filedir.xml >../doc/help/api-filedir.tokens
|
||||
$(RM) api-filedir.xml
|
||||
mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-ppd.header --intro api-ppd.shtml \
|
||||
api-ppd.xml ppd.h ppd-*.c >../doc/help/api-ppd.html
|
||||
mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens
|
||||
$(RM) api-ppd.xml
|
||||
mxmldoc --section "Programming" --title "HTTP and IPP APIs" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-httpipp.header --intro api-httpipp.shtml \
|
||||
api-httpipp.xml \
|
||||
http.h ipp.h auth.c getdevices.c getputfile.c encode.c \
|
||||
http.c http-addr.c http-support.c ipp.c ipp-support.c \
|
||||
md5passwd.c request.c >../doc/help/api-httpipp.html
|
||||
mxmldoc --tokens help/api-httpipp.html api-httpipp.xml >../doc/help/api-httpipp.tokens
|
||||
$(RM) api-httpipp.xml
|
||||
mxmldoc --section "Programming" \
|
||||
--title "Filter and Backend Programming" \
|
||||
--css ../doc/cups-printable.css \
|
||||
@@ -616,7 +623,6 @@ apihelp:
|
||||
api-filter.xml \
|
||||
backchannel.c backend.h backend.c sidechannel.c sidechannel.h \
|
||||
>../doc/help/api-filter.html
|
||||
mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens
|
||||
$(RM) api-filter.xml
|
||||
|
||||
|
||||
@@ -625,8 +631,6 @@ apihelp:
|
||||
#
|
||||
|
||||
sloc:
|
||||
echo "libcupslite: \c"
|
||||
sloccount $(LITEOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}'
|
||||
echo "libcups: \c"
|
||||
sloccount $(LIBOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}'
|
||||
|
||||
|
||||
+36
-19
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2001-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -831,7 +831,7 @@ cupsAdminExportSamba(
|
||||
* The returned settings should be freed with cupsFreeOptions() when
|
||||
* you are done with them.
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
* @since CUPS 1.3/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -1147,7 +1147,7 @@ cupsAdminGetServerSettings(
|
||||
/*
|
||||
* 'cupsAdminSetServerSettings()' - Set settings on the server.
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
* @since CUPS 1.3/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -1194,6 +1194,7 @@ cupsAdminSetServerSettings(
|
||||
int cupsd_num_settings; /* New number of settings */
|
||||
int old_share_printers, /* Share local printers */
|
||||
old_remote_admin, /* Remote administration allowed? */
|
||||
old_remote_any, /* Remote access from anywhere? */
|
||||
old_user_cancel_any, /* Cancel-job policy set? */
|
||||
old_debug_logging; /* LogLevel debug set? */
|
||||
cups_option_t *cupsd_settings, /* New settings */
|
||||
@@ -1259,12 +1260,12 @@ cupsAdminSetServerSettings(
|
||||
|
||||
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, cupsd_num_settings,
|
||||
cupsd_settings)) != NULL)
|
||||
remote_any = atoi(val);
|
||||
old_remote_any = atoi(val);
|
||||
else
|
||||
remote_any = 0;
|
||||
old_remote_any = 0;
|
||||
|
||||
DEBUG_printf(("1cupsAdminSetServerSettings: old remote_any=%d",
|
||||
remote_any));
|
||||
old_remote_any));
|
||||
|
||||
if ((val = cupsGetOption(CUPS_SERVER_SHARE_PRINTERS, cupsd_num_settings,
|
||||
cupsd_settings)) != NULL)
|
||||
@@ -1310,12 +1311,23 @@ cupsAdminSetServerSettings(
|
||||
DEBUG_printf(("1cupsAdminSetServerSettings: debug_logging=%d",
|
||||
debug_logging));
|
||||
|
||||
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings,
|
||||
settings)) != NULL)
|
||||
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings, settings)) != NULL)
|
||||
{
|
||||
remote_any = atoi(val);
|
||||
|
||||
DEBUG_printf(("1cupsAdminSetServerSettings: remote_any=%d",
|
||||
remote_any));
|
||||
if (remote_any == old_remote_any)
|
||||
{
|
||||
/*
|
||||
* No change to this setting...
|
||||
*/
|
||||
|
||||
remote_any = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
remote_any = -1;
|
||||
|
||||
DEBUG_printf(("1cupsAdminSetServerSettings: remote_any=%d", remote_any));
|
||||
|
||||
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, num_settings,
|
||||
settings)) != NULL)
|
||||
@@ -1430,7 +1442,7 @@ cupsAdminSetServerSettings(
|
||||
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")) &&
|
||||
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
|
||||
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
|
||||
{
|
||||
if (!wrote_port_listen)
|
||||
{
|
||||
@@ -1616,7 +1628,7 @@ cupsAdminSetServerSettings(
|
||||
remote_any > 0 ? "all" : "@LOCAL");
|
||||
}
|
||||
else if (in_root_location &&
|
||||
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
|
||||
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
|
||||
{
|
||||
wrote_root_location = 1;
|
||||
|
||||
@@ -1719,7 +1731,7 @@ cupsAdminSetServerSettings(
|
||||
in_cancel_job = 0;
|
||||
}
|
||||
else if ((((in_admin_location || in_conf_location || in_root_location) &&
|
||||
(remote_admin >= 0 || remote_any > 0)) ||
|
||||
(remote_admin >= 0 || remote_any >= 0)) ||
|
||||
(in_root_location && share_printers >= 0)) &&
|
||||
(!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny") ||
|
||||
!_cups_strcasecmp(line, "Order")))
|
||||
@@ -1811,7 +1823,7 @@ cupsAdminSetServerSettings(
|
||||
}
|
||||
|
||||
if (!wrote_port_listen &&
|
||||
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
|
||||
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
|
||||
{
|
||||
if (remote_admin > 0 || remote_any > 0 || share_printers > 0)
|
||||
{
|
||||
@@ -1832,7 +1844,7 @@ cupsAdminSetServerSettings(
|
||||
}
|
||||
|
||||
if (!wrote_root_location &&
|
||||
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
|
||||
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
|
||||
{
|
||||
if (remote_admin > 0 && share_printers > 0)
|
||||
cupsFilePuts(temp,
|
||||
@@ -2009,9 +2021,14 @@ cupsAdminSetServerSettings(
|
||||
old_remote_admin ? "1" : "0",
|
||||
cupsd_num_settings, &cupsd_settings);
|
||||
|
||||
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
|
||||
remote_any ? "1" : "0",
|
||||
cupsd_num_settings, &cupsd_settings);
|
||||
if (remote_any >= 0)
|
||||
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
|
||||
remote_any ? "1" : "0",
|
||||
cupsd_num_settings, &cupsd_settings);
|
||||
else
|
||||
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
|
||||
old_remote_any ? "1" : "0",
|
||||
cupsd_num_settings, &cupsd_settings);
|
||||
|
||||
if (share_printers >= 0)
|
||||
cupsd_num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS,
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ typedef void (*cups_device_cb_t)(const char *device_class,
|
||||
const char *device_uri,
|
||||
const char *device_location, void *user_data);
|
||||
/* Device callback
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
* @since CUPS 1.4/macOS 10.6@ */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<!--
|
||||
Array API header for CUPS.
|
||||
|
||||
Copyright 2008-2011 by Apple Inc.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h1 class='title'>Array API</h1>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Header</th>
|
||||
<th>cups/array.h</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Library</th>
|
||||
<td>-lcups</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>See Also</th>
|
||||
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@@ -1,194 +0,0 @@
|
||||
<!--
|
||||
Array API introduction for CUPS.
|
||||
|
||||
Copyright 2007-2011 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
|
||||
|
||||
<p>The CUPS array API provides a high-performance generic array container.
|
||||
The contents of the array container can be sorted and the container itself is
|
||||
designed for optimal speed and memory usage under a wide variety of conditions.
|
||||
Sorted arrays use a binary search algorithm from the last found or inserted
|
||||
element to quickly find matching elements in the array. Arrays created with the
|
||||
optional hash function can often find elements with a single lookup. The
|
||||
<a href='#cups_array_t'><code>cups_array_t</code></a> type is used when
|
||||
referring to a CUPS array.</p>
|
||||
|
||||
<p>The CUPS scheduler (<tt>cupsd</tt>) and many of the CUPS API
|
||||
functions use the array API to efficiently manage large lists of
|
||||
data.</p>
|
||||
|
||||
<h3><a name='MANAGING_ARRAYS'>Managing Arrays</a></h3>
|
||||
|
||||
<p>Arrays are created using either the
|
||||
<a href='#cupsArrayNew'><code>cupsArrayNew</code></a>,
|
||||
<a href='#cupsArrayNew2'><code>cupsArrayNew2</code></a>, or
|
||||
<a href='#cupsArrayNew2'><code>cupsArrayNew3</code></a> functions. The
|
||||
first function creates a new array with the specified callback function
|
||||
and user data pointer:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
static int compare_func(void *first, void *second, void *user_data);
|
||||
|
||||
void *user_data;
|
||||
<a href='#cups_array_t'>cups_array_t</a> *array = <a href='#cupsArrayNew'>cupsArrayNew</a>(compare_func, user_data);
|
||||
</pre>
|
||||
|
||||
<p>The comparison function (type
|
||||
<a href="#cups_arrayfunc_t"><code>cups_arrayfunc_t</code></a>) is called
|
||||
whenever an element is added to the array and can be <code>NULL</code> to
|
||||
create an unsorted array. The function returns -1 if the first element should
|
||||
come before the second, 0 if the first and second elements should have the same
|
||||
ordering, and 1 if the first element should come after the second.</p>
|
||||
|
||||
<p>The "user_data" pointer is passed to your comparison function. Pass
|
||||
<code>NULL</code> if you do not need to associate the elements in your array
|
||||
with additional information.</p>
|
||||
|
||||
<p>The <a href='#cupsArrayNew2'><code>cupsArrayNew2</code></a> function adds
|
||||
two more arguments to support hashed lookups, which can potentially provide
|
||||
instantaneous ("O(1)") lookups in your array:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
#define HASH_SIZE 512 /* Size of hash table */
|
||||
|
||||
static int compare_func(void *first, void *second, void *user_data);
|
||||
static int hash_func(void *element, void *user_data);
|
||||
|
||||
void *user_data;
|
||||
<a href='#cups_array_t'>cups_array_t</a> *hash_array = <a href='#cupsArrayNew2'>cupsArrayNew2</a>(compare_func, user_data, hash_func, HASH_SIZE);
|
||||
</pre>
|
||||
|
||||
<p>The hash function (type
|
||||
<a href="#cups_ahash_func_t"><code>cups_ahash_func_t</code></a>) should return a
|
||||
number from 0 to (hash_size-1) that (hopefully) uniquely identifies the
|
||||
element and is called whenever you look up an element in the array with
|
||||
<a href='#cupsArrayFind'><code>cupsArrayFind</code></a>. The hash size is
|
||||
only limited by available memory, but generally should not be larger than
|
||||
16384 to realize any performance improvement.</p>
|
||||
|
||||
<p>The <a href='#cupsArrayNew3'><code>cupsArrayNew3</code></a> function adds
|
||||
copy and free callbacks to support basic memory management of elements:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
#define HASH_SIZE 512 /* Size of hash table */
|
||||
|
||||
static int compare_func(void *first, void *second, void *user_data);
|
||||
static void *copy_func(void *element, void *user_data);
|
||||
static void free_func(void *element, void *user_data);
|
||||
static int hash_func(void *element, void *user_data);
|
||||
|
||||
void *user_data;
|
||||
<a href='#cups_array_t'>cups_array_t</a> *array = <a href='#cupsArrayNew3'>cupsArrayNew3</a>(compare_func, user_data, NULL, 0, copy_func, free_func);
|
||||
|
||||
<a href='#cups_array_t'>cups_array_t</a> *hash_array = <a href='#cupsArrayNew3'>cupsArrayNew3</a>(compare_func, user_data, hash_func, HASH_SIZE, copy_func, free_func);
|
||||
</pre>
|
||||
|
||||
<p>Once you have created the array, you add elements using the
|
||||
<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a>
|
||||
<a href='#cupsArrayInsert'><code>cupsArrayInsert</code></a> functions.
|
||||
The first function adds an element to the array, adding the new element
|
||||
after any elements that have the same order, while the second inserts the
|
||||
element before others with the same order. For unsorted arrays,
|
||||
<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a> appends the element to
|
||||
the end of the array while
|
||||
<a href='#cupsArrayInsert'><code>cupsArrayInsert</code></a> inserts the
|
||||
element at the beginning of the array. For example, the following code
|
||||
creates a sorted array of character strings:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
/* Use strcmp() to compare strings - it will ignore the user_data pointer */
|
||||
<a href='#cups_array_t'>cups_array_t</a> *array = <a href='#cupsArrayNew'>cupsArrayNew</a>((<a href='#cups_array_func_t'>cups_array_func_t</a>)strcmp, NULL);
|
||||
|
||||
/* Add four strings to the array */
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "One Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Two Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Red Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Blue Fish");
|
||||
</pre>
|
||||
|
||||
<p>Elements are removed using the
|
||||
<a href='#cupsArrayRemove'><code>cupsArrayRemove</code></a> function, for
|
||||
example:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
/* Use strcmp() to compare strings - it will ignore the user_data pointer */
|
||||
<a href='#cups_array_t'>cups_array_t</a> *array = <a href='#cupsArrayNew'>cupsArrayNew</a>((<a href='#cups_array_func_t'>cups_array_func_t</a>)strcmp, NULL);
|
||||
|
||||
/* Add four strings to the array */
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "One Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Two Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Red Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Blue Fish");
|
||||
|
||||
/* Remove "Red Fish" */
|
||||
<a href='#cupsArrayRemove'>cupsArrayRemove</a>(array, "Red Fish");
|
||||
</pre>
|
||||
|
||||
<p>Finally, you free the memory used by the array using the
|
||||
<a href='#cupsArrayDelete'><code>cupsArrayDelete</code></a> function. All
|
||||
of the memory for the array and hash table (if any) is freed, however <em>CUPS
|
||||
does not free the elements unless you provide copy and free functions</em>.</p>
|
||||
|
||||
<h3><a name='FINDING_AND_ENUMERATING'>Finding and Enumerating Elements</a></h3>
|
||||
|
||||
<p>CUPS provides several functions to find and enumerate elements in an
|
||||
array. Each one sets or updates a "current index" into the array, such that
|
||||
future lookups will start where the last one left off:</p>
|
||||
|
||||
<dl>
|
||||
<dt><a href='#cupsArrayFind'><code>cupsArrayFind</code></a></dt>
|
||||
<dd>Returns the first matching element.</dd>
|
||||
<dt><a href='#cupsArrayFirst'><code>cupsArrayFirst</code></a></dt>
|
||||
<dd>Returns the first element in the array.</dd>
|
||||
<dt><a href='#cupsArrayIndex'><code>cupsArrayIndex</code></a></dt>
|
||||
<dd>Returns the Nth element in the array, starting at 0.</dd>
|
||||
<dt><a href='#cupsArrayLast'><code>cupsArrayLast</code></a></dt>
|
||||
<dd>Returns the last element in the array.</dd>
|
||||
<dt><a href='#cupsArrayNext'><code>cupsArrayNext</code></a></dt>
|
||||
<dd>Returns the next element in the array.</dd>
|
||||
<dt><a href='#cupsArrayPrev'><code>cupsArrayPrev</code></a></dt>
|
||||
<dd>Returns the previous element in the array.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Each of these functions returns <code>NULL</code> when there is no
|
||||
corresponding element. For example, a simple <code>for</code> loop using the
|
||||
<a href='#cupsArrayFirst'><code>cupsArrayFirst</code></a> and
|
||||
<a href='#cupsArrayNext'><code>cupsArrayNext</code></a> functions will
|
||||
enumerate all of the strings in our previous example:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/array.h>
|
||||
|
||||
/* Use strcmp() to compare strings - it will ignore the user_data pointer */
|
||||
<a href='#cups_array_t'>cups_array_t</a> *array = <a href='#cupsArrayNew'>cupsArrayNew</a>((<a href='#cups_array_func_t'>cups_array_func_t</a>)strcmp, NULL);
|
||||
|
||||
/* Add four strings to the array */
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "One Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Two Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Red Fish");
|
||||
<a href='#cupsArrayAdd'>cupsArrayAdd</a>(array, "Blue Fish");
|
||||
|
||||
/* Show all of the strings in the array */
|
||||
char *s;
|
||||
for (s = (char *)<a href='#cupsArrayFirst'>cupsArrayFirst</a>(array); s != NULL; s = (char *)<a href='#cupsArrayNext'>cupsArrayNext</a>(array))
|
||||
puts(s);
|
||||
</pre>
|
||||
@@ -1,38 +0,0 @@
|
||||
<!--
|
||||
CUPS API header for CUPS.
|
||||
|
||||
Copyright 2008-2011 by Apple Inc.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h1 class='title'>CUPS API</h1>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Header</th>
|
||||
<th>cups/cups.h</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Library</th>
|
||||
<td>-lcups</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>See Also</th>
|
||||
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
|
||||
Programming: <a href='api-array.html' target='_top'>Array API</a><br>
|
||||
Programming: <a href='api-filedir.html' target='_top'>File and Directory APIs</a><br>
|
||||
Programming: <a href='api-filter.html' target='_top'>Filter and Backend Programming</a><br>
|
||||
Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a><br>
|
||||
Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
|
||||
Programming: <a href='api-raster.html' target='_top'>Raster API</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@@ -1,441 +0,0 @@
|
||||
<!--
|
||||
API introduction for CUPS.
|
||||
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
|
||||
|
||||
<p>The CUPS API provides the convenience functions needed to support
|
||||
applications, filters, printer drivers, and backends that need to interface
|
||||
with the CUPS scheduler.</p>
|
||||
|
||||
<h3><a name='CLIENTS_AND_SERVERS'>Clients and Servers</a></h3>
|
||||
|
||||
<p>CUPS is based on the Internet Printing Protocol ("IPP"), which allows
|
||||
clients (applications) to communicate with a server (the scheduler) to get a
|
||||
list of printers, send print jobs, and so forth. You identify which server
|
||||
you want to communicate with using a pointer to the opaque structure
|
||||
<code>http_t</code>. All of the examples in this document use the
|
||||
<code>CUPS_HTTP_DEFAULT</code> constant, referring to the default connection
|
||||
to the scheduler. The <a href='api-httpipp.html' target='_top'>HTTP and IPP
|
||||
APIs</a> document provides more information on server connections.</p>
|
||||
|
||||
<h3><a name='PRINTERS_AND_CLASSES'>Printers and Classes</a></h3>
|
||||
|
||||
<p>Printers and classes (collections of printers) are accessed through
|
||||
the <a href="#cups_dest_t"><code>cups_dest_t</code></a> structure which
|
||||
includes the name (<code>name</code>), instance (<code>instance</code> -
|
||||
a way of selecting certain saved options/settings), and the options and
|
||||
attributes associated with that destination (<code>num_options</code> and
|
||||
<code>options</code>). Destinations are created using the
|
||||
<a href="#cupsGetDests"><code>cupsGetDests</code></a> function and freed
|
||||
using the <a href='#cupsFreeDests'><code>cupsFreeDests</code></a> function.
|
||||
The <a href='#cupsGetDest'><code>cupsGetDest</code></a> function finds a
|
||||
specific destination for printing:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dests;
|
||||
int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&dests);
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
|
||||
|
||||
/* do something with dest */
|
||||
|
||||
<a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
|
||||
</pre>
|
||||
|
||||
<p>Passing <code>NULL</code> to
|
||||
<a href='#cupsGetDest'><code>cupsGetDest</code></a> for the destination name
|
||||
will return the default destination. Similarly, passing a <code>NULL</code>
|
||||
instance will return the default instance for that destination.</p>
|
||||
|
||||
<div class='table'><table summary='Table 1: Printer Attributes' width='80%'>
|
||||
<caption>Table 1: <a name='TABLE1'>Printer Attributes</a></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"auth-info-required"</td>
|
||||
<td>The type of authentication required for printing to this
|
||||
destination: "none", "username,password", "domain,username,password",
|
||||
or "negotiate" (Kerberos)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-info"</td>
|
||||
<td>The human-readable description of the destination such as "My
|
||||
Laser Printer".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-is-accepting-jobs"</td>
|
||||
<td>"true" if the destination is accepting new jobs, "false" if
|
||||
not.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-is-shared"</td>
|
||||
<td>"true" if the destination is being shared with other computers,
|
||||
"false" if not.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-location"</td>
|
||||
<td>The human-readable location of the destination such as "Lab 4".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-make-and-model"</td>
|
||||
<td>The human-readable make and model of the destination such as "HP
|
||||
LaserJet 4000 Series".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-state"</td>
|
||||
<td>"3" if the destination is idle, "4" if the destination is printing
|
||||
a job, and "5" if the destination is stopped.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-state-change-time"</td>
|
||||
<td>The UNIX time when the destination entered the current state.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-state-reasons"</td>
|
||||
<td>Additional comma-delimited state keywords for the destination
|
||||
such as "media-tray-empty-error" and "toner-low-warning".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"printer-type"</td>
|
||||
<td>The <a href='#cups_printer_t'><code>cups_printer_t</code></a>
|
||||
value associated with the destination.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
<h3><a name='OPTIONS'>Options</a></h3>
|
||||
|
||||
<p>Options are stored in arrays of
|
||||
<a href='#cups_option_t'><code>cups_option_t</code></a> structures. Each
|
||||
option has a name (<code>name</code>) and value (<code>value</code>)
|
||||
associated with it. The <a href='#cups_dest_t'><code>cups_dest_t</code></a>
|
||||
<code>num_options</code> and <code>options</code> members contain the
|
||||
default options for a particular destination, along with several informational
|
||||
attributes about the destination as shown in <a href='#TABLE1'>Table 1</a>.
|
||||
The <a href='#cupsGetOption'><code>cupsGetOption</code></a> function gets
|
||||
the value for the named option. For example, the following code lists the
|
||||
available destinations and their human-readable descriptions:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dests;
|
||||
int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&dests);
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int i;
|
||||
const char *value;
|
||||
|
||||
for (i = num_dests, dest = dests; i > 0; i --, dest ++)
|
||||
if (dest->instance == NULL)
|
||||
{
|
||||
value = <a href='#cupsGetOption'>cupsGetOption</a>("printer-info", dest->num_options, dest->options);
|
||||
printf("%s (%s)\n", dest->name, value ? value : "no description");
|
||||
}
|
||||
|
||||
<a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
|
||||
</pre>
|
||||
|
||||
<p>You can create your own option arrays using the
|
||||
<a href='#cupsAddOption'><code>cupsAddOption</code></a> function, which
|
||||
adds a single named option to an array:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
int num_options = 0;
|
||||
<a href='#cups_option_t'>cups_option_t</a> *options = NULL;
|
||||
|
||||
/* The returned num_options value is updated as needed */
|
||||
num_options = <a href='#cupsAddOption'>cupsAddOption</a>("first", "value", num_options, &options);
|
||||
|
||||
/* This adds a second option value */
|
||||
num_options = <a href='#cupsAddOption'>cupsAddOption</a>("second", "value", num_options, &options);
|
||||
|
||||
/* This replaces the first option we added */
|
||||
num_options = <a href='#cupsAddOption'>cupsAddOption</a>("first", "new value", num_options, &options);
|
||||
</pre>
|
||||
|
||||
<p>Use a <code>for</code> loop to copy the options from a destination:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
int i;
|
||||
int num_options = 0;
|
||||
<a href='#cups_option_t'>cups_option_t</a> *options = NULL;
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
|
||||
for (i = 0; i < dest->num_options; i ++)
|
||||
num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value,
|
||||
num_options, &options);
|
||||
</pre>
|
||||
|
||||
<p>Use the <a href='#cupsFreeOptions'><code>cupsFreeOptions</code></a>
|
||||
function to free the options array when you are done using it:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='#cupsFreeOptions'>cupsFreeOptions</a>(num_options, options);
|
||||
</pre>
|
||||
|
||||
<h3><a name='PRINT_JOBS'>Print Jobs</a></h3>
|
||||
|
||||
<p>Print jobs are identified by a locally-unique job ID number from 1 to
|
||||
2<sup>31</sup>-1 and have options and one or more files for printing to a
|
||||
single destination. The <a href='#cupsPrintFile'><code>cupsPrintFile</code></a>
|
||||
function creates a new job with one file. The following code prints the CUPS
|
||||
test page file:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int num_options;
|
||||
<a href='#cups_option_t'>cups_option_t</a> *options;
|
||||
int job_id;
|
||||
|
||||
/* Print a single file */
|
||||
job_id = <a href='#cupsPrintFile'>cupsPrintFile</a>(dest->name, "/usr/share/cups/data/testprint.ps",
|
||||
"Test Print", num_options, options);
|
||||
</pre>
|
||||
|
||||
<p>The <a href='#cupsPrintFiles'><code>cupsPrintFiles</code></a> function
|
||||
creates a job with multiple files. The files are provided in a
|
||||
<code>char *</code> array:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int num_options;
|
||||
<a href='#cups_option_t'>cups_option_t</a> *options;
|
||||
int job_id;
|
||||
char *files[3] = { "file1.pdf", "file2.pdf", "file3.pdf" };
|
||||
|
||||
/* Print three files */
|
||||
job_id = <a href='#cupsPrintFiles'>cupsPrintFiles</a>(dest->name, 3, files, "Test Print", num_options, options);
|
||||
</pre>
|
||||
|
||||
<p>Finally, the <a href='#cupsCreateJob'><code>cupsCreateJob</code></a>
|
||||
function creates a new job with no files in it. Files are added using the
|
||||
<a href='#cupsStartDocument'><code>cupsStartDocument</code></a>,
|
||||
<a href='api-httpipp.html#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>,
|
||||
and <a href='#cupsFinishDocument'><code>cupsFinishDocument</code></a> functions.
|
||||
The following example creates a job with 10 text files for printing:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int num_options;
|
||||
<a href='#cups_option_t'>cups_option_t</a> *options;
|
||||
int job_id;
|
||||
int i;
|
||||
char buffer[1024];
|
||||
|
||||
/* Create the job */
|
||||
job_id = <a href='#cupsCreateJob'>cupsCreateJob</a>(CUPS_HTTP_DEFAULT, dest->name, "10 Text Files",
|
||||
num_options, options);
|
||||
|
||||
/* If the job is created, add 10 files */
|
||||
if (job_id > 0)
|
||||
{
|
||||
for (i = 1; i <= 10; i ++)
|
||||
{
|
||||
snprintf(buffer, sizeof(buffer), "file%d.txt", i);
|
||||
|
||||
<a href='#cupsStartDocument'>cupsStartDocument</a>(CUPS_HTTP_DEFAULT, dest->name, job_id, buffer,
|
||||
CUPS_FORMAT_TEXT, i == 10);
|
||||
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"File %d\n"
|
||||
"\n"
|
||||
"One fish,\n"
|
||||
"Two fish,\n
|
||||
"Red fish,\n
|
||||
"Blue fish\n", i);
|
||||
|
||||
/* cupsWriteRequestData can be called as many times as needed */
|
||||
<a href='#cupsWriteRequestData'>cupsWriteRequestData</a>(CUPS_HTTP_DEFAULT, buffer, strlen(buffer));
|
||||
|
||||
<a href='#cupsFinishDocument'>cupsFinishDocument</a>(CUPS_HTTP_DEFAULT, dest->name);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>Once you have created a job, you can monitor its status using the
|
||||
<a href='#cupsGetJobs'><code>cupsGetJobs</code></a> function, which returns
|
||||
an array of <a href='#cups_job_t'><code>cups_job_t</code></a> structures.
|
||||
Each contains the job ID (<code>id</code>), destination name
|
||||
(<code>dest</code>), title (<code>title</code>), and other information
|
||||
associated with the job. The job array is freed using the
|
||||
<a href='#cupsFreeJobs'><code>cupsFreeJobs</code></a> function. The following
|
||||
example monitors a specific job ID, showing the current job state once every
|
||||
5 seconds until the job is completed:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int job_id;
|
||||
int num_jobs;
|
||||
<a href='#cups_job_t'>cups_job_t</a> *jobs;
|
||||
int i;
|
||||
ipp_jstate_t job_state = IPP_JOB_PENDING;
|
||||
|
||||
while (job_state < IPP_JOB_STOPPED)
|
||||
{
|
||||
/* Get my jobs (1) with any state (-1) */
|
||||
num_jobs = <a href='#cupsGetJobs'>cupsGetJobs</a>(&jobs, dest->name, 1, -1);
|
||||
|
||||
/* Loop to find my job */
|
||||
job_state = IPP_JOB_COMPLETED;
|
||||
|
||||
for (i = 0; i < num_jobs; i ++)
|
||||
if (jobs[i].id == job_id)
|
||||
{
|
||||
job_state = jobs[i].state;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Free the job array */
|
||||
<a href='#cupsFreeJobs'>cupsFreeJobs</a>(num_jobs, jobs);
|
||||
|
||||
/* Show the current state */
|
||||
switch (job_state)
|
||||
{
|
||||
case IPP_JOB_PENDING :
|
||||
printf("Job %d is pending.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_HELD :
|
||||
printf("Job %d is held.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_PROCESSING :
|
||||
printf("Job %d is processing.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_STOPPED :
|
||||
printf("Job %d is stopped.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_CANCELED :
|
||||
printf("Job %d is canceled.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_ABORTED :
|
||||
printf("Job %d is aborted.\n", job_id);
|
||||
break;
|
||||
case IPP_JOB_COMPLETED :
|
||||
printf("Job %d is completed.\n", job_id);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Sleep if the job is not finished */
|
||||
if (job_state < IPP_JOB_STOPPED)
|
||||
sleep(5);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>To cancel a job, use the
|
||||
<a href='#cupsCancelJob'><code>cupsCancelJob</code></a> function with the
|
||||
job ID:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
<a href='#cups_dest_t'>cups_dest_t</a> *dest;
|
||||
int job_id;
|
||||
|
||||
<a href='#cupsCancelJob'>cupsCancelJob</a>(dest->name, job_id);
|
||||
</pre>
|
||||
|
||||
<h3><a name='ERROR_HANDLING'>Error Handling</a></h3>
|
||||
|
||||
<p>If any of the CUPS API printing functions returns an error, the reason for
|
||||
that error can be found by calling the
|
||||
<a href='#cupsLastError'><code>cupsLastError</code></a> and
|
||||
<a href='#cupsLastErrorString'><code>cupsLastErrorString</code></a> functions.
|
||||
<a href='#cupsLastError'><code>cupsLastError</code></a> returns the last IPP
|
||||
error code
|
||||
(<a href='api-httpipp.html#ipp_status_t'><code>ipp_status_t</code></a>)
|
||||
that was encountered, while
|
||||
<a href='#cupsLastErrorString'><code>cupsLastErrorString</code></a> returns
|
||||
a (localized) human-readable string that can be shown to the user. For example,
|
||||
if any of the job creation functions returns a job ID of 0, you can use
|
||||
<a href='#cupsLastErrorString'><code>cupsLastErrorString</code></a> to show
|
||||
the reason why the job could not be created:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
int job_id;
|
||||
|
||||
if (job_id == 0)
|
||||
puts(cupsLastErrorString());
|
||||
</pre>
|
||||
|
||||
<h3><a name='PASSWORDS_AND_AUTHENTICATION'>Passwords and Authentication</a></h3>
|
||||
|
||||
<p>CUPS supports authentication of any request, including submission of print
|
||||
jobs. The default mechanism for getting the username and password is to use the
|
||||
login user and a password from the console.</p>
|
||||
|
||||
<p>To support other types of applications, in particular Graphical User
|
||||
Interfaces ("GUIs"), the CUPS API provides functions to set the default
|
||||
username and to register a callback function that returns a password string.</p>
|
||||
|
||||
<p>The <a href="#cupsSetPasswordCB"><code>cupsSetPasswordCB</code></a>
|
||||
function is used to set a password callback in your program. Only one
|
||||
function can be used at any time.</p>
|
||||
|
||||
<p>The <a href="#cupsSetUser"><code>cupsSetUser</code></a> function sets the
|
||||
current username for authentication. This function can be called by your
|
||||
password callback function to change the current username as needed.</p>
|
||||
|
||||
<p>The following example shows a simple password callback that gets a
|
||||
username and password from the user:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
const char *
|
||||
my_password_cb(const char *prompt)
|
||||
{
|
||||
char user[65];
|
||||
|
||||
|
||||
puts(prompt);
|
||||
|
||||
/* Get a username from the user */
|
||||
printf("Username: ");
|
||||
if (fgets(user, sizeof(user), stdin) == NULL)
|
||||
return (NULL);
|
||||
|
||||
/* Strip the newline from the string and set the user */
|
||||
user[strlen(user) - 1] = '\0';
|
||||
|
||||
<a href='#cupsSetUser'>cupsSetUser</a>(user);
|
||||
|
||||
/* Use getpass() to ask for the password... */
|
||||
return (getpass("Password: "));
|
||||
}
|
||||
|
||||
<a href='#cupsSetPasswordCB'>cupsSetPasswordCB</a>(my_password_cb);
|
||||
</pre>
|
||||
|
||||
<p>Similarly, a GUI could display the prompt string in a window with input
|
||||
fields for the username and password. The username should default to the
|
||||
string returned by the <a href="#cupsUser"><code>cupsUser</code></a>
|
||||
function.</p>
|
||||
@@ -1,34 +0,0 @@
|
||||
<!--
|
||||
File and Directory API header for CUPS.
|
||||
|
||||
Copyright 2008-2011 by Apple Inc.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h1 class='title'>File and Directory APIs</h1>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Headers</th>
|
||||
<th>cups/file.h<br>
|
||||
cups/dir.h</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Library</th>
|
||||
<td>-lcups</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>See Also</th>
|
||||
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
|
||||
Programming: <a href='api-cups.html' target='_top'>CUPS API</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@@ -1,29 +0,0 @@
|
||||
<!--
|
||||
File and directory API introduction for CUPS.
|
||||
|
||||
Copyright 2007-2011 by Apple Inc.
|
||||
Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h2 class='title'><a name="OVERVIEW">Overview</a></h2>
|
||||
|
||||
<p>The CUPS file and directory APIs provide portable interfaces
|
||||
for manipulating files and listing files and directories. Unlike
|
||||
stdio <code>FILE</code> streams, the <code>cupsFile</code> functions
|
||||
allow you to open more than 256 files at any given time. They
|
||||
also manage the platform-specific details of locking, large file
|
||||
support, line endings (CR, LF, or CR LF), and reading and writing
|
||||
files using Flate ("gzip") compression. Finally, you can also
|
||||
connect, read from, and write to network connections using the
|
||||
<code>cupsFile</code> functions.</p>
|
||||
|
||||
<p>The <code>cupsDir</code> functions manage the platform-specific
|
||||
details of directory access/listing and provide a convenient way
|
||||
to get both a list of files and the information (permissions,
|
||||
size, timestamp, etc.) for each of those files.</p>
|
||||
@@ -79,7 +79,7 @@ directory to write to.</p>
|
||||
|
||||
<p>In addition, some operating systems provide additional security mechanisms
|
||||
that further limit file system access, even for backends running as root. On
|
||||
OS X, for example, no backend may write to a user's home directory. See the <a href="#SANDBOXING">Sandboxing on OS X</a> section for more information.</p>
|
||||
macOS, for example, no backend may write to a user's home directory. See the <a href="#SANDBOXING">Sandboxing on macOS</a> section for more information.</p>
|
||||
</blockquote>
|
||||
|
||||
<h3><a name="SIGNALS">Canceled Jobs and Signal Handling</a></h3>
|
||||
@@ -94,7 +94,7 @@ being printed.</p>
|
||||
<p>Filters and backends may also receive <code>SIGPIPE</code> when an upstream or downstream filter/backend exits with a non-zero status. Developers should generally ignore <code>SIGPIPE</code> at the beginning of <code>main()</code> with the following function call:</p>
|
||||
|
||||
<pre class="example">
|
||||
#include <signal.h>>
|
||||
#include <signal.h>
|
||||
|
||||
...
|
||||
|
||||
@@ -151,7 +151,7 @@ when running print filters and backends:</p>
|
||||
|
||||
<dt>APPLE_LANGUAGE</dt>
|
||||
<dd>The Apple language identifier associated with the job
|
||||
(OS X only).</dd>
|
||||
(macOS only).</dd>
|
||||
|
||||
<dt>CHARSET</dt>
|
||||
<dd>The job character set, typically "utf-8".</dd>
|
||||
@@ -561,7 +561,7 @@ sub-state and not an issue that applies when a job is not printing.</p>
|
||||
<blockquote><b>Note:</b>
|
||||
|
||||
<p>"STATE:" messages often provide visible alerts to the user. For example,
|
||||
on OS X setting a printer-state-reason value with an "-error" or
|
||||
on macOS setting a printer-state-reason value with an "-error" or
|
||||
"-warning" suffix will cause the printer's dock item to bounce if the
|
||||
corresponding reason is localized with a cupsIPPReason keyword in the
|
||||
printer's PPD file.</p>
|
||||
@@ -851,9 +851,9 @@ void *my_data;
|
||||
<a href="#cupsSideChannelSNMPWalk">cupsSNMPSideChannelWalk</a>(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);
|
||||
</pre>
|
||||
|
||||
<h2><a name="SANDBOXING">Sandboxing on OS X</a></h2>
|
||||
<h2><a name="SANDBOXING">Sandboxing on macOS</a></h2>
|
||||
|
||||
<p>Starting with OS X 10.6, filters and backends are run inside a security "sandbox" which further limits (beyond the normal UNIX user/group permissions) what a filter or backend can do. This helps to both secure the printing system from malicious software and enforce the functional separation of components in the CUPS filter chain. What follows is a list of actions that are explicitly allowed for all filters and backends:</p>
|
||||
<p>Starting with macOS 10.6, filters and backends are run inside a security "sandbox" which further limits (beyond the normal UNIX user/group permissions) what a filter or backend can do. This helps to both secure the printing system from malicious software and enforce the functional separation of components in the CUPS filter chain. What follows is a list of actions that are explicitly allowed for all filters and backends:</p>
|
||||
|
||||
<ol>
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<!--
|
||||
HTTP and IPP API header for CUPS.
|
||||
|
||||
Copyright 2007-2016 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h1 class='title'>HTTP and IPP APIs</h1>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Headers</th>
|
||||
<th>cups/cups.h<br>
|
||||
cups/http.h<br>
|
||||
cups/ipp.h</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Library</th>
|
||||
<td>-lcups</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>See Also</th>
|
||||
<td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
|
||||
Programming: <a href='api-cups.html'>CUPS API</a><br>
|
||||
References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@@ -1,315 +0,0 @@
|
||||
<!--
|
||||
HTTP and IPP API introduction for CUPS.
|
||||
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
property of Apple Inc. and are protected by Federal copyright
|
||||
law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
which should have been included with this file. If this file is
|
||||
file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
-->
|
||||
|
||||
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
|
||||
|
||||
<p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
|
||||
protocols and CUPS scheduler. They are typically used by monitoring and
|
||||
administration programs to perform specific functions not supported by the
|
||||
high-level CUPS API functions.</p>
|
||||
|
||||
<p>The HTTP APIs use an opaque structure called
|
||||
<a href='#http_t'><code>http_t</code></a> to manage connections to
|
||||
a particular HTTP or IPP server. The
|
||||
<a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is
|
||||
used to create an instance of this structure for a particular server.
|
||||
The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the
|
||||
<code>cups</code> functions to refer to the default CUPS server - the functions
|
||||
create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p>
|
||||
|
||||
<p>The IPP APIs use two opaque structures for requests (messages sent to the CUPS scheduler) and responses (messages sent back to your application from the scheduler). The <a href='#ipp_t'><code>ipp_t</code></a> type holds a complete request or response and is allocated using the <a href='#ippNew'><code>ippNew</code></a> or <a href='#ippNewRequest'><code>ippNewRequest</code></a> functions and freed using the <a href='#ippDelete'><code>ippDelete</code></a> function.</p>
|
||||
|
||||
<p>The second opaque structure is called <a href='#ipp_attribute_t'><code>ipp_attribute_t</code></a> and holds a single IPP attribute which consists of a group tag (<a href='#ippGetGroupTag'><code>ippGetGroupTag</code></a>), a value type tag (<a href='#ippGetValueTag'><code>ippGetValueTag</code></a>), the attribute name (<a href='#ippGetName'><code>ippGetName</code></a>), and 1 or more values (<a href='#ippGetCount'><code>ippGetCount</code></a>, <a href='#ippGetBoolean'><code>ippGetBoolean</code></a>, <a href='#ippGetCollection'><code>ippGetCollection</code></a>, <a href='#ippGetDate'><code>ippGetDate</code></a>, <a href='#ippGetInteger'><code>ippGetInteger</code></a>, <a href='#ippGetRange'><code>ippGetRange</code></a>, <a href='#ippGetResolution'><code>ippGetResolution</code></a>, and <a href='#ippGetString'><code>ippGetString</code></a>). Attributes are added to an <a href='#ipp_t'><code>ipp_t</code></a> pointer using one of the <code>ippAdd</code> functions. For example, use <a href='#ippAddString'><code>ippAddString</code></a> to add the "printer-uri" and "requesting-user-name" string attributes to a request:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
|
||||
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, "ipp://localhost/printers/");
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
|
||||
NULL, cupsUser());
|
||||
</pre>
|
||||
|
||||
<p>Once you have created an IPP request, use the <code>cups</code> functions to send the request to and read the response from the server. For example, the <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function can be used for simple query operations that do not involve files:</p>
|
||||
|
||||
<pre class='example'>
|
||||
#include <cups/cups.h>
|
||||
|
||||
|
||||
<a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void)
|
||||
{
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
|
||||
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, "ipp://localhost/printers/");
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
|
||||
NULL, cupsUser());
|
||||
|
||||
return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/"));
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>The <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function frees the request and returns an IPP response or <code>NULL</code> pointer if the request could not be sent to the server. Once you have a response from the server, you can either use the <a href='#ippFindAttribute'><code>ippFindAttribute</code></a> and <a href='#ippFindNextAttribute'><code>ippFindNextAttribute</code></a> functions to find specific attributes, for example:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
|
||||
|
||||
attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM);
|
||||
</pre>
|
||||
|
||||
<p>You can also walk the list of attributes with a simple <code>for</code> loop like this:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
|
||||
|
||||
for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
|
||||
if (ippGetName(attr) == NULL)
|
||||
puts("--SEPARATOR--");
|
||||
else
|
||||
puts(ippGetName(attr));
|
||||
</pre>
|
||||
|
||||
<p>The <code>for</code> loop approach is normally used when collecting attributes for multiple objects (jobs, printers, etc.) in a response. Attributes with <code>NULL</code> names indicate a separator between the attributes of each object. For example, the following code will list the jobs returned from our previous <a href='#get_jobs'><code>get_jobs</code></a> example code:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>();
|
||||
|
||||
if (response != NULL)
|
||||
{
|
||||
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
|
||||
const char *attrname;
|
||||
int job_id = 0;
|
||||
const char *job_name = NULL;
|
||||
const char *job_originating_user_name = NULL;
|
||||
|
||||
puts("Job ID Owner Title");
|
||||
puts("------ ---------------- ---------------------------------");
|
||||
|
||||
for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
|
||||
{
|
||||
/* Attributes without names are separators between jobs */
|
||||
attrname = ippGetName(attr);
|
||||
if (attrname == NULL)
|
||||
{
|
||||
if (job_id > 0)
|
||||
{
|
||||
if (job_name == NULL)
|
||||
job_name = "(withheld)";
|
||||
|
||||
if (job_originating_user_name == NULL)
|
||||
job_originating_user_name = "(withheld)";
|
||||
|
||||
printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
|
||||
}
|
||||
|
||||
job_id = 0;
|
||||
job_name = NULL;
|
||||
job_originating_user_name = NULL;
|
||||
continue;
|
||||
}
|
||||
else if (!strcmp(attrname, "job-id") && ippGetValueTag(attr) == IPP_TAG_INTEGER)
|
||||
job_id = ippGetInteger(attr, 0);
|
||||
else if (!strcmp(attrname, "job-name") && ippGetValueTag(attr) == IPP_TAG_NAME)
|
||||
job_name = ippGetString(attr, 0, NULL);
|
||||
else if (!strcmp(attrname, "job-originating-user-name") &&
|
||||
ippGetValueTag(attr) == IPP_TAG_NAME)
|
||||
job_originating_user_name = ippGetString(attr, 0, NULL);
|
||||
}
|
||||
|
||||
if (job_id > 0)
|
||||
{
|
||||
if (job_name == NULL)
|
||||
job_name = "(withheld)";
|
||||
|
||||
if (job_originating_user_name == NULL)
|
||||
job_originating_user_name = "(withheld)";
|
||||
|
||||
printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3>
|
||||
|
||||
<p>To ensure proper encoding, the
|
||||
<a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be
|
||||
used to format a "printer-uri" string for all printer-based requests:</p>
|
||||
|
||||
<pre class='example'>
|
||||
const char *name = "Foo";
|
||||
char uri[1024];
|
||||
<a href='#ipp_t'>ipp_t</a> *request;
|
||||
|
||||
<a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
|
||||
ippPort(), "/printers/%s", name);
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
</pre>
|
||||
|
||||
<h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3>
|
||||
|
||||
<p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and
|
||||
<a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are
|
||||
used for requests involving files. The
|
||||
<a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function
|
||||
attaches the named file to a request and is typically used when sending a print
|
||||
file or changing a printer's PPD file:</p>
|
||||
|
||||
<pre class='example'>
|
||||
const char *filename = "/usr/share/cups/data/testprint.ps";
|
||||
const char *name = "Foo";
|
||||
char uri[1024];
|
||||
char resource[1024];
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB);
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
|
||||
/* Use httpAssembleURIf for the printer-uri string */
|
||||
<a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
|
||||
ippPort(), "/printers/%s", name);
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
|
||||
NULL, cupsUser());
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
|
||||
NULL, "testprint.ps");
|
||||
|
||||
/* Use snprintf for the resource path */
|
||||
snprintf(resource, sizeof(resource), "/printers/%s", name);
|
||||
|
||||
response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
|
||||
</pre>
|
||||
|
||||
<p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function
|
||||
optionally attaches a file to the request and optionally saves a file in the
|
||||
response from the server. It is used when using a pipe for the request
|
||||
attachment or when using a request that returns a file, currently only
|
||||
<code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example,
|
||||
the following code will download the PPD file for the sample HP LaserJet
|
||||
printer driver:</p>
|
||||
|
||||
<pre class='example'>
|
||||
char tempfile[1024];
|
||||
int tempfd;
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, "laserjet.ppd");
|
||||
|
||||
tempfd = cupsTempFd(tempfile, sizeof(tempfile));
|
||||
|
||||
response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd);
|
||||
</pre>
|
||||
|
||||
<p>The example passes <code>-1</code> for the input file descriptor to specify
|
||||
that no file is to be attached to the request. The PPD file attached to the
|
||||
response is written to the temporary file descriptor we created using the
|
||||
<code>cupsTempFd</code> function.</p>
|
||||
|
||||
<h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3>
|
||||
|
||||
<p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and
|
||||
<a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support
|
||||
asynchronous communications with the server. Unlike the other request
|
||||
functions, the IPP request is not automatically freed, so remember to
|
||||
free your request with the <a href='#ippDelete'><code>ippDelete</code></a>
|
||||
function.</p>
|
||||
|
||||
<p>File data is attached to the request using the
|
||||
<a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>
|
||||
function, while file data returned from the server is read using the
|
||||
<a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a>
|
||||
function. We can rewrite the previous <code>CUPS_GET_PPD</code> example
|
||||
to use the asynchronous functions quite easily:</p>
|
||||
|
||||
<pre class='example'>
|
||||
char tempfile[1024];
|
||||
int tempfd;
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, "laserjet.ppd");
|
||||
|
||||
tempfd = cupsTempFd(tempfile, sizeof(tempfile));
|
||||
|
||||
if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE)
|
||||
{
|
||||
response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
|
||||
|
||||
if (response != NULL)
|
||||
{
|
||||
ssize_t bytes;
|
||||
char buffer[8192];
|
||||
|
||||
while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
|
||||
write(tempfd, buffer, bytes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free the request! */
|
||||
<a href='#ippDelete'>ippDelete</a>(request);
|
||||
</pre>
|
||||
|
||||
<p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function
|
||||
returns the initial HTTP request status, typically either
|
||||
<code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status
|
||||
is returned when the request requires authentication of some sort. The
|
||||
<a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function
|
||||
must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request
|
||||
re-sent. We can add authentication support to our example code by using a
|
||||
<code>do ... while</code> loop:</p>
|
||||
|
||||
<pre class='example'>
|
||||
char tempfile[1024];
|
||||
int tempfd;
|
||||
<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
|
||||
<a href='#ipp_t'>ipp_t</a> *response;
|
||||
http_status_t status;
|
||||
|
||||
<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, "laserjet.ppd");
|
||||
|
||||
tempfd = cupsTempFd(tempfile, sizeof(tempfile));
|
||||
|
||||
/* Loop for authentication */
|
||||
do
|
||||
{
|
||||
status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/");
|
||||
|
||||
if (status == HTTP_UNAUTHORIZED)
|
||||
{
|
||||
/* Try to authenticate, break out of the loop if that fails */
|
||||
if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/"))
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (status != HTTP_CONTINUE && status != HTTP_UNAUTHORIZED);
|
||||
|
||||
if (status == HTTP_CONTINUE)
|
||||
{
|
||||
response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
|
||||
|
||||
if (response != NULL)
|
||||
{
|
||||
ssize_t bytes;
|
||||
char buffer[8192];
|
||||
|
||||
while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
|
||||
write(tempfd, buffer, bytes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free the request! */
|
||||
<a href='#ippDelete'>ippDelete</a>(request);
|
||||
</pre>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<h1 class='title'>PPD API (DEPRECATED)</h1>
|
||||
|
||||
<blockquote>The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
|
||||
<blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
<thead>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
|
||||
|
||||
<blockquote>The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
|
||||
<blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
|
||||
|
||||
<p>The CUPS PPD API provides read-only access the data in PostScript Printer
|
||||
Description ("PPD") files which are used for all printers with a driver. With
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
+24
-24
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ static int cups_array_find(cups_array_t *a, void *e, int prev, int *rdiff);
|
||||
* appended at the end of the run of identical elements. For unsorted arrays,
|
||||
* the element is appended to the end of the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -207,7 +207,7 @@ _cupsArrayAddStrings(cups_array_t *a, /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* elements themselves.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -249,7 +249,7 @@ cupsArrayClear(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayCount()' - Get the number of elements in the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - Number of elements */
|
||||
@@ -276,7 +276,7 @@ cupsArrayCount(cups_array_t *a) /* I - Array */
|
||||
* The current element is undefined until you call @link cupsArrayFind@,
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - Element */
|
||||
@@ -306,7 +306,7 @@ cupsArrayCurrent(cups_array_t *a) /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* elements themselves.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -350,7 +350,7 @@ cupsArrayDelete(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayDup()' - Duplicate the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Duplicate array */
|
||||
@@ -435,7 +435,7 @@ cupsArrayDup(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayFind()' - Find an element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - Element found or @code NULL@ */
|
||||
@@ -530,7 +530,7 @@ cupsArrayFind(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayFirst()' - Get the first element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - First element or @code NULL@ if the array is empty */
|
||||
@@ -559,7 +559,7 @@ cupsArrayFirst(cups_array_t *a) /* I - Array */
|
||||
* The current element is undefined until you call @link cupsArrayFind@,
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
* @since CUPS 1.3/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - Index of the current element, starting at 0 */
|
||||
@@ -575,7 +575,7 @@ cupsArrayGetIndex(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayGetInsert()' - Get the index of the last inserted element.
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
* @since CUPS 1.3/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - Index of the last inserted element, starting at 0 */
|
||||
@@ -591,7 +591,7 @@ cupsArrayGetInsert(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayIndex()' - Get the N-th element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - N-th element or @code NULL@ */
|
||||
@@ -614,7 +614,7 @@ cupsArrayIndex(cups_array_t *a, /* I - Array */
|
||||
* inserted at the beginning of the run of identical elements. For unsorted
|
||||
* arrays, the element is inserted at the beginning of the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 0 on failure, 1 on success */
|
||||
@@ -644,7 +644,7 @@ cupsArrayInsert(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayLast()' - Get the last element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - Last element or @code NULL@ if the array is empty */
|
||||
@@ -675,7 +675,7 @@ cupsArrayLast(cups_array_t *a) /* I - Array */
|
||||
* data pointer argument can safely be omitted when not required so functions
|
||||
* like @code strcmp@ can be used for sorted string arrays.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Array */
|
||||
@@ -697,7 +697,7 @@ cupsArrayNew(cups_array_func_t f, /* I - Comparison function or @code NULL@ for
|
||||
* The hash function ("h") is used to implement cached lookups with the
|
||||
* specified hash size ("hsize").
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
* @since CUPS 1.3/macOS 10.5@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Array */
|
||||
@@ -727,7 +727,7 @@ cupsArrayNew2(cups_array_func_t f, /* I - Comparison function or @code NULL@ fo
|
||||
* The free function ("cf") is used to automatically free/release elements when
|
||||
* removed or the array is deleted.
|
||||
*
|
||||
* @since CUPS 1.5/OS X 10.7@
|
||||
* @since CUPS 1.5/macOS 10.7@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Array */
|
||||
@@ -811,7 +811,7 @@ _cupsArrayNewStrings(const char *s, /* I - Delimited strings or NULL */
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
|
||||
* to set the current element.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - Next element or @code NULL@ */
|
||||
@@ -844,7 +844,7 @@ cupsArrayNext(cups_array_t *a) /* I - Array */
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
|
||||
* to set the current element.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - Previous element or @code NULL@ */
|
||||
@@ -877,7 +877,7 @@ cupsArrayPrev(cups_array_t *a) /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* removed element.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -942,7 +942,7 @@ cupsArrayRemove(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - New current element */
|
||||
@@ -973,7 +973,7 @@ cupsArrayRestore(cups_array_t *a) /* I - Array */
|
||||
*
|
||||
* The save/restore stack is guaranteed to be at least 32 elements deep.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -995,7 +995,7 @@ cupsArraySave(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayUserData()' - Return the user data for an array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
void * /* O - User data */
|
||||
@@ -1011,7 +1011,7 @@ cupsArrayUserData(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cups_array_add()' - Insert or append an element to the array.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
static int /* O - 1 on success, 0 on failure */
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
+5
-8
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -11,7 +11,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ extern const char *cssmErrorString(int error);
|
||||
# else
|
||||
# define GSS_AUTH_IDENTITY_TYPE_1 1
|
||||
# define gss_acquire_cred_ex_f __ApplePrivate_gss_acquire_cred_ex_f
|
||||
typedef struct gss_auth_identity
|
||||
typedef struct gss_auth_identity /* @private@ */
|
||||
{
|
||||
uint32_t type;
|
||||
uint32_t flags;
|
||||
@@ -102,7 +102,7 @@ static int cups_local_auth(http_t *http);
|
||||
* This function should be called in response to a @code HTTP_STATUS_UNAUTHORIZED@
|
||||
* status, prior to resubmitting your request.
|
||||
*
|
||||
* @since CUPS 1.1.20/OS X 10.4@
|
||||
* @since CUPS 1.1.20/macOS 10.4@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -386,10 +386,7 @@ _cupsSetNegotiateAuthString(
|
||||
|
||||
if (data.sem)
|
||||
{
|
||||
major_status = gss_acquire_cred_ex_f(NULL, GSS_C_NO_NAME, 0,
|
||||
GSS_C_INDEFINITE, GSS_KRB5_MECHANISM,
|
||||
GSS_C_INITIATE, &identity, &data,
|
||||
cups_gss_acquire);
|
||||
major_status = gss_acquire_cred_ex_f(NULL, GSS_C_NO_NAME, 0, GSS_C_INDEFINITE, GSS_KRB5_MECHANISM, GSS_C_INITIATE, (gss_auth_identity_t)&identity, &data, cups_gss_acquire);
|
||||
|
||||
if (major_status == GSS_S_COMPLETE)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ static void cups_setup(fd_set *set, struct timeval *tval,
|
||||
* parameter controls how many seconds to wait for the data - use 0.0 to
|
||||
* return immediately if there is no data, -1.0 to wait for data indefinitely.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Bytes read or -1 on error */
|
||||
@@ -93,7 +93,7 @@ cupsBackChannelRead(char *buffer, /* I - Buffer to read into */
|
||||
* 0.0 to return immediately if the data cannot be written, -1.0 to wait
|
||||
* indefinitely.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Bytes written or -1 on error */
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ static void quote_string(const char *s);
|
||||
* variable or the device URI passed in argv[0], whichever is found
|
||||
* first.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @since CUPS 1.2/macOS 10.5@
|
||||
*/
|
||||
|
||||
const char * /* O - Device URI or @code NULL@ */
|
||||
@@ -85,7 +85,7 @@ cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */
|
||||
* It handles quoting of special characters in the device-make-and-model,
|
||||
* device-info, device-id, and device-location strings.
|
||||
*
|
||||
* @since CUPS 1.4/OS X 10.6@
|
||||
* @since CUPS 1.4/macOS 10.6@
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Private definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
int need_res_init; /* Need to reinitialize resolver? */
|
||||
|
||||
/* ipp.c */
|
||||
ipp_uchar_t ipp_date[11]; /* RFC-1903 date/time data */
|
||||
ipp_uchar_t ipp_date[11]; /* RFC-2579 date/time data */
|
||||
_cups_buffer_t *cups_buffers; /* Buffer list */
|
||||
|
||||
/* ipp-support.c */
|
||||
@@ -124,7 +124,8 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
*ppd_size_lut, /* Lookup table for PPD names */
|
||||
*pwg_size_lut; /* Lookup table for PWG names */
|
||||
pwg_media_t pwg_media; /* PWG media data for custom size */
|
||||
char pwg_name[65]; /* PWG media name for custom size */
|
||||
char pwg_name[65], /* PWG media name for custom size */
|
||||
ppd_name[41]; /* PPD media name for custom size */
|
||||
|
||||
/* request.c */
|
||||
http_t *http; /* Current server connection */
|
||||
|
||||
+47
-42
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
@@ -24,8 +24,8 @@
|
||||
# if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED)
|
||||
# define __CUPS_SSIZE_T_DEFINED
|
||||
# include <stddef.h>
|
||||
/* Windows does not support the ssize_t type, so map it to off_t... */
|
||||
typedef off_t ssize_t; /* @private@ */
|
||||
/* Windows does not support the ssize_t type, so map it to long... */
|
||||
typedef long ssize_t; /* @private@ */
|
||||
# endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
|
||||
|
||||
# include "file.h"
|
||||
@@ -47,10 +47,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0200
|
||||
# define CUPS_VERSION 2.0206
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
# define CUPS_VERSION_PATCH 6
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -78,7 +78,7 @@ extern "C" {
|
||||
# define CUPS_DEST_FLAGS_NONE 0x00
|
||||
/* No flags are set */
|
||||
# define CUPS_DEST_FLAGS_UNCONNECTED 0x01
|
||||
/* There is not connection */
|
||||
/* There is no connection */
|
||||
# define CUPS_DEST_FLAGS_MORE 0x02
|
||||
/* There are more destinations */
|
||||
# define CUPS_DEST_FLAGS_REMOVED 0x04
|
||||
@@ -92,6 +92,8 @@ extern "C" {
|
||||
/* A connection is being established */
|
||||
# define CUPS_DEST_FLAGS_CANCELED 0x40
|
||||
/* Operation was canceled */
|
||||
# define CUPS_DEST_FLAGS_DEVICE 0x80
|
||||
/* For @link cupsConnectDest@: Connect to device */
|
||||
|
||||
/* Flags for cupsGetDestMediaByName/Size */
|
||||
# define CUPS_MEDIA_FLAGS_DEFAULT 0x00
|
||||
@@ -207,39 +209,37 @@ enum cups_ptype_e /* Printer type/capability bit
|
||||
CUPS_PRINTER_REMOTE = 0x0002, /* Remote printer or class */
|
||||
CUPS_PRINTER_BW = 0x0004, /* Can do B&W printing */
|
||||
CUPS_PRINTER_COLOR = 0x0008, /* Can do color printing */
|
||||
CUPS_PRINTER_DUPLEX = 0x0010, /* Can do duplexing */
|
||||
CUPS_PRINTER_DUPLEX = 0x0010, /* Can do two-sided printing */
|
||||
CUPS_PRINTER_STAPLE = 0x0020, /* Can staple output */
|
||||
CUPS_PRINTER_COPIES = 0x0040, /* Can do copies */
|
||||
CUPS_PRINTER_COLLATE = 0x0080, /* Can collage copies */
|
||||
CUPS_PRINTER_COPIES = 0x0040, /* Can do copies in hardware */
|
||||
CUPS_PRINTER_COLLATE = 0x0080, /* Can quickly collate copies */
|
||||
CUPS_PRINTER_PUNCH = 0x0100, /* Can punch output */
|
||||
CUPS_PRINTER_COVER = 0x0200, /* Can cover output */
|
||||
CUPS_PRINTER_BIND = 0x0400, /* Can bind output */
|
||||
CUPS_PRINTER_SORT = 0x0800, /* Can sort output */
|
||||
CUPS_PRINTER_SMALL = 0x1000, /* Can do Letter/Legal/A4 */
|
||||
CUPS_PRINTER_MEDIUM = 0x2000, /* Can do Tabloid/B/C/A3/A2 */
|
||||
CUPS_PRINTER_LARGE = 0x4000, /* Can do D/E/A1/A0 */
|
||||
CUPS_PRINTER_VARIABLE = 0x8000, /* Can do variable sizes */
|
||||
CUPS_PRINTER_SMALL = 0x1000, /* Can print on Letter/Legal/A4-size media */
|
||||
CUPS_PRINTER_MEDIUM = 0x2000, /* Can print on Tabloid/B/C/A3/A2-size media */
|
||||
CUPS_PRINTER_LARGE = 0x4000, /* Can print on D/E/A1/A0-size media */
|
||||
CUPS_PRINTER_VARIABLE = 0x8000, /* Can print on rolls and custom-size media */
|
||||
CUPS_PRINTER_IMPLICIT = 0x10000, /* Implicit class @private@
|
||||
* @since Deprecated@ */
|
||||
CUPS_PRINTER_DEFAULT = 0x20000, /* Default printer on network */
|
||||
CUPS_PRINTER_FAX = 0x40000, /* Fax queue */
|
||||
CUPS_PRINTER_REJECTING = 0x80000, /* Printer is rejecting jobs */
|
||||
CUPS_PRINTER_DELETE = 0x100000, /* Delete printer
|
||||
* @since CUPS 1.2/OS X 10.5@ */
|
||||
* @deprecated@ @exclude all@ */
|
||||
CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared
|
||||
* @since CUPS 1.2/OS X 10.5@ */
|
||||
* @since CUPS 1.2/macOS 10.5@ */
|
||||
CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication
|
||||
* @since CUPS 1.2/OS X 10.5@ */
|
||||
* @since CUPS 1.2/macOS 10.5@ */
|
||||
CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands
|
||||
* @since CUPS 1.2/OS X 10.5@ */
|
||||
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered
|
||||
* and added @private@
|
||||
* @since Deprecated@ */
|
||||
* @since CUPS 1.2/macOS 10.5@ */
|
||||
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was discovered @since CUPS 1.2/macOS 10.5@ */
|
||||
CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
* @since CUPS 1.4/macOS 10.6@ @private@ */
|
||||
CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
CUPS_PRINTER_3D = 0x8000000, /* Printer with 3D capabilities @since CUPS 2.1@ */
|
||||
* @since CUPS 1.4/macOS 10.6@ @private@ */
|
||||
CUPS_PRINTER_3D = 0x8000000, /* Printer with 3D capabilities @exclude all@ @private@ */
|
||||
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT |
|
||||
* DEFAULT | FAX | REJECTING | DELETE |
|
||||
* NOT_SHARED | AUTHENTICATED |
|
||||
@@ -263,14 +263,14 @@ typedef struct cups_dest_s /**** Destination ****/
|
||||
|
||||
typedef struct _cups_dinfo_s cups_dinfo_t;
|
||||
/* Destination capability and status
|
||||
* information @since CUPS 1.6/OS X 10.8@ */
|
||||
* information @since CUPS 1.6/macOS 10.8@ */
|
||||
|
||||
typedef struct cups_job_s /**** Job ****/
|
||||
{
|
||||
int id; /* The job ID */
|
||||
char *dest; /* Printer or class name */
|
||||
char *title; /* Title/job name */
|
||||
char *user; /* User the submitted the job */
|
||||
char *user; /* User that submitted the job */
|
||||
char *format; /* Document format */
|
||||
ipp_jstate_t state; /* Job state */
|
||||
int size; /* Size in kilobytes */
|
||||
@@ -280,7 +280,7 @@ typedef struct cups_job_s /**** Job ****/
|
||||
time_t processing_time; /* Time the job was processed */
|
||||
} cups_job_t;
|
||||
|
||||
typedef struct cups_size_s /**** Media Size @since CUPS 1.6/OS X 10.8@ ****/
|
||||
typedef struct cups_size_s /**** Media Size @since CUPS 1.6/macOS 10.8@ ****/
|
||||
{
|
||||
char media[128]; /* Media name to use */
|
||||
int width, /* Width in hundredths of millimeters */
|
||||
@@ -300,33 +300,34 @@ typedef int (*cups_client_cert_cb_t)(http_t *http, void *tls,
|
||||
cups_array_t *distinguished_names,
|
||||
void *user_data);
|
||||
/* Client credentials callback
|
||||
* @since CUPS 1.5/OS X 10.7@ */
|
||||
* @since CUPS 1.5/macOS 10.7@ */
|
||||
|
||||
typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags,
|
||||
cups_dest_t *dest);
|
||||
/* Destination enumeration callback
|
||||
* @since CUPS 1.6/OS X 10.8@ */
|
||||
* @since CUPS 1.6/macOS 10.8@ */
|
||||
|
||||
# ifdef __BLOCKS__
|
||||
typedef int (^cups_dest_block_t)(unsigned flags, cups_dest_t *dest);
|
||||
/* Destination enumeration block
|
||||
* @since CUPS 1.6/OS X 10.8@ */
|
||||
* @since CUPS 1.6/macOS 10.8@
|
||||
* @exclude all@ */
|
||||
# endif /* __BLOCKS__ */
|
||||
|
||||
typedef const char *(*cups_password_cb_t)(const char *prompt);
|
||||
/* Password callback */
|
||||
/* Password callback @exclude all@ */
|
||||
|
||||
typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http,
|
||||
const char *method,
|
||||
const char *resource,
|
||||
void *user_data);
|
||||
/* New password callback
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
* @since CUPS 1.4/macOS 10.6@ */
|
||||
|
||||
typedef int (*cups_server_cert_cb_t)(http_t *http, void *tls,
|
||||
cups_array_t *certs, void *user_data);
|
||||
/* Server credentials callback
|
||||
* @since CUPS 1.5/OS X 10.7@ */
|
||||
* @since CUPS 1.5/macOS 10.7@ */
|
||||
|
||||
|
||||
/*
|
||||
@@ -341,11 +342,11 @@ extern ipp_t *cupsDoRequest(http_t *http, ipp_t *request,
|
||||
const char *resource);
|
||||
extern http_encryption_t cupsEncryption(void);
|
||||
extern void cupsFreeJobs(int num_jobs, cups_job_t *jobs);
|
||||
extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
|
||||
extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsEnumDests instead.");
|
||||
extern const char *cupsGetDefault(void);
|
||||
extern int cupsGetJobs(cups_job_t **jobs, const char *name,
|
||||
int myjobs, int whichjobs);
|
||||
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
|
||||
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsEnumDests instead.");
|
||||
extern ipp_status_t cupsLastError(void);
|
||||
extern int cupsPrintFile(const char *name, const char *filename,
|
||||
const char *title, int num_options,
|
||||
@@ -414,7 +415,7 @@ extern int cupsPrintFiles2(http_t *http, const char *name,
|
||||
extern int cupsSetDests2(http_t *http, int num_dests,
|
||||
cups_dest_t *dests) _CUPS_API_1_1_21;
|
||||
|
||||
/**** New in CUPS 1.2/OS X 10.5 ****/
|
||||
/**** New in CUPS 1.2/macOS 10.5 ****/
|
||||
extern ssize_t cupsBackChannelRead(char *buffer, size_t bytes,
|
||||
double timeout) _CUPS_API_1_2;
|
||||
extern ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes,
|
||||
@@ -431,7 +432,7 @@ extern int cupsRemoveOption(const char *name, int num_options,
|
||||
cups_option_t **options) _CUPS_API_1_2;
|
||||
extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
|
||||
|
||||
/**** New in CUPS 1.3/OS X 10.5 ****/
|
||||
/**** New in CUPS 1.3/macOS 10.5 ****/
|
||||
extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request,
|
||||
const char *resource, int infile,
|
||||
int outfile) _CUPS_API_1_3;
|
||||
@@ -444,7 +445,7 @@ extern void cupsSetDefaultDest(const char *name,
|
||||
int num_dests,
|
||||
cups_dest_t *dests) _CUPS_API_1_3;
|
||||
|
||||
/**** New in CUPS 1.4/OS X 10.6 ****/
|
||||
/**** New in CUPS 1.4/macOS 10.6 ****/
|
||||
extern ipp_status_t cupsCancelJob2(http_t *http, const char *name,
|
||||
int job_id, int purge) _CUPS_API_1_4;
|
||||
extern int cupsCreateJob(http_t *http, const char *name,
|
||||
@@ -473,14 +474,14 @@ extern http_status_t cupsStartDocument(http_t *http, const char *name,
|
||||
extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer,
|
||||
size_t length) _CUPS_API_1_4;
|
||||
|
||||
/**** New in CUPS 1.5/OS X 10.7 ****/
|
||||
/**** New in CUPS 1.5/macOS 10.7 ****/
|
||||
extern void cupsSetClientCertCB(cups_client_cert_cb_t cb,
|
||||
void *user_data) _CUPS_API_1_5;
|
||||
extern int cupsSetCredentials(cups_array_t *certs) _CUPS_API_1_5;
|
||||
extern void cupsSetServerCertCB(cups_server_cert_cb_t cb,
|
||||
void *user_data) _CUPS_API_1_5;
|
||||
|
||||
/**** New in CUPS 1.6/OS X 10.8 ****/
|
||||
/**** New in CUPS 1.6/macOS 10.8 ****/
|
||||
extern ipp_status_t cupsCancelDestJob(http_t *http, cups_dest_t *dest,
|
||||
int job_id) _CUPS_API_1_6;
|
||||
extern int cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
|
||||
@@ -592,15 +593,19 @@ extern int cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
|
||||
extern void cupsSetUserAgent(const char *user_agent) _CUPS_API_1_7;
|
||||
extern const char *cupsUserAgent(void) _CUPS_API_1_7;
|
||||
|
||||
/* New in CUPS 2.0/OS X 10.10 */
|
||||
/* New in CUPS 2.0/macOS 10.10 */
|
||||
extern cups_dest_t *cupsGetDestWithURI(const char *name, const char *uri) _CUPS_API_2_0;
|
||||
extern const char *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, unsigned flags, cups_size_t *size) _CUPS_API_2_0;
|
||||
extern int cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date) _CUPS_API_2_0;
|
||||
extern int cupsSetServerCredentials(const char *path, const char *common_name, int auto_create) _CUPS_API_2_0;
|
||||
|
||||
/* New in CUPS 2.2 */
|
||||
/* New in CUPS 2.2/macOS 10.12 */
|
||||
extern ssize_t cupsHashData(const char *algorithm, const void *data, size_t datalen, unsigned char *hash, size_t hashsize) _CUPS_API_2_2;
|
||||
|
||||
/* New in CUPS 2.2.4 */
|
||||
extern int cupsAddIntegerOption(const char *name, int value, int num_options, cups_option_t **options) _CUPS_API_2_2_4;
|
||||
extern int cupsGetIntegerOption(const char *name, int num_options, cups_option_t *options) _CUPS_API_2_2_4;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 15 KiB |
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário