]> git.ipfire.org Git - thirdparty/cups.git/log
thirdparty/cups.git
15 months agoUpdate cups-files.conf man page. 942/head
Michael R Sweet [Tue, 16 Apr 2024 12:51:38 +0000 (08:51 -0400)] 
Update cups-files.conf man page.

Move writing of strings files to cupsdCleanDirty, and add new
CUPSD_DIRTY_STRINGS bit.

Update PPD cache version and check modification time of cups-files.conf to
trigger re-load of strings.

Make sure "strings" subdirectory is created as necessary.

15 months agoUpdate _ppdCacheCreateWithPPD to collect localizable strings for the languages
Michael R Sweet [Tue, 16 Apr 2024 12:29:10 +0000 (08:29 -0400)] 
Update _ppdCacheCreateWithPPD to collect localizable strings for the languages
we are interested in.

Add support for Languages directive in cups-files.conf.

15 months agoUpdate _ppdCacheCreateWithPPD to accept languages to localize.
Michael R Sweet [Mon, 15 Apr 2024 20:00:42 +0000 (16:00 -0400)] 
Update _ppdCacheCreateWithPPD to accept languages to localize.

15 months agoAddress clang warning.
Michael R Sweet [Mon, 15 Apr 2024 19:02:37 +0000 (15:02 -0400)] 
Address clang warning.

15 months agoUpdate _cupsMessageLoad to accept existing strings array.
Michael R Sweet [Mon, 15 Apr 2024 00:37:11 +0000 (20:37 -0400)] 
Update _cupsMessageLoad to accept existing strings array.

15 months agoLocalize finishings/finishings-col, media-source, media-type, output-bin, and
Michael R Sweet [Sun, 14 Apr 2024 14:51:54 +0000 (10:51 -0400)] 
Localize finishings/finishings-col, media-source, media-type, output-bin, and
printer-state-reasons keywords using both the standard CUPS message catalogs and
the printer's own strings files, with a backup of converting keywords like
"one-two-three" to "One Two Three".

Ignore generated cachebench program.

15 months agoFix printer-strings-uri support in _ppdCreateFromIPP.
Michael R Sweet [Fri, 12 Apr 2024 23:26:24 +0000 (19:26 -0400)] 
Fix printer-strings-uri support in _ppdCreateFromIPP.

Add PPD cache benchmarking program.

15 months agoInitial work on loading all desired languages from IPP printer.
Michael R Sweet [Tue, 9 Apr 2024 22:18:32 +0000 (18:18 -0400)] 
Initial work on loading all desired languages from IPP printer.

15 months agoFix warnings.
Michael R Sweet [Tue, 9 Apr 2024 22:18:08 +0000 (18:18 -0400)] 
Fix warnings.

15 months agoFix regression for background queue creation (Issue #934)
Michael R Sweet [Tue, 9 Apr 2024 15:51:47 +0000 (11:51 -0400)] 
Fix regression for background queue creation (Issue #934)

15 months agoFix constant name.
Michael R Sweet [Sat, 6 Apr 2024 14:22:57 +0000 (10:22 -0400)] 
Fix constant name.

15 months agoUse NULL hostname for services on the loopback interface (Issue #902)
Michael R Sweet [Sat, 6 Apr 2024 13:51:14 +0000 (09:51 -0400)] 
Use NULL hostname for services on the loopback interface (Issue #902)

15 months agoUse size_t for buffer size and make sure it is at least 4 bytes long (Issue #921)
Michael R Sweet [Sat, 6 Apr 2024 13:37:09 +0000 (09:37 -0400)] 
Use size_t for buffer size and make sure it is at least 4 bytes long (Issue #921)

15 months agoReport an error if you use lpadmin to set defaults for a temporary queue (Issue ...
Michael R Sweet [Fri, 5 Apr 2024 21:26:19 +0000 (17:26 -0400)] 
Report an error if you use lpadmin to set defaults for a temporary queue (Issue #237)

15 months agoDelete enum attribute if the value is bad.
Michael R Sweet [Fri, 5 Apr 2024 21:03:32 +0000 (17:03 -0400)] 
Delete enum attribute if the value is bad.

15 months agoSupport enum keywords (Issue #734)
Michael R Sweet [Fri, 5 Apr 2024 21:00:45 +0000 (17:00 -0400)] 
Support enum keywords (Issue #734)

15 months agoFix document-unprintable-error support (Issue #391)
Michael R Sweet [Fri, 5 Apr 2024 20:43:38 +0000 (16:43 -0400)] 
Fix document-unprintable-error support (Issue #391)

15 months agoSupport ippeveprinter -f option with -a (Issue #759)
Michael R Sweet [Fri, 5 Apr 2024 20:34:05 +0000 (16:34 -0400)] 
Support ippeveprinter -f option with -a (Issue #759)

15 months agoTweak Docker docos.
Michael R Sweet [Fri, 5 Apr 2024 20:17:10 +0000 (16:17 -0400)] 
Tweak Docker docos.

15 months agoMerge pull request #929 from Rudra-IITM/docker_build
Michael R Sweet [Fri, 5 Apr 2024 20:13:37 +0000 (16:13 -0400)] 
Merge pull request #929 from Rudra-IITM/docker_build

[Add] Dockerfile and Docker Compose for CUPS setup

16 months agoUse cupsCopyString instead of strlcpy.
Michael R Sweet [Fri, 5 Apr 2024 18:13:47 +0000 (14:13 -0400)] 
Use cupsCopyString instead of strlcpy.

16 months agoChangelog.
Michael R Sweet [Fri, 5 Apr 2024 17:26:10 +0000 (13:26 -0400)] 
Changelog.

16 months agoAdd cupsCopyDestInfo2 API (Issue #586)
Michael R Sweet [Fri, 5 Apr 2024 17:25:31 +0000 (13:25 -0400)] 
Add cupsCopyDestInfo2 API (Issue #586)

16 months agoupdate install.md 929/head
Rudra-IITM [Fri, 5 Apr 2024 17:08:01 +0000 (22:38 +0530)] 
update install.md

16 months agoFix cupsCopyDestInfo device connection detection (Issue #586)
Michael R Sweet [Fri, 5 Apr 2024 17:07:56 +0000 (13:07 -0400)] 
Fix cupsCopyDestInfo device connection detection (Issue #586)

16 months agoadd dockerfile and docker-compose file
Rudra-IITM [Fri, 5 Apr 2024 17:00:54 +0000 (22:30 +0530)] 
add dockerfile and docker-compose file

16 months agoAllow PPD choices and PWG keywords to select media (Issue #238)
Michael R Sweet [Fri, 5 Apr 2024 12:46:37 +0000 (08:46 -0400)] 
Allow PPD choices and PWG keywords to select media (Issue #238)

16 months agoUpdate CHANGES.md
Zdenek Dohnal [Fri, 5 Apr 2024 08:44:55 +0000 (10:44 +0200)] 
Update CHANGES.md

16 months agoscheduler: Fix sending response headers to client
zdohnal [Fri, 5 Apr 2024 08:41:00 +0000 (10:41 +0200)] 
scheduler: Fix sending response headers to client

Sometimes headers are not correctly copied into response to the client (some are missing). It happens because sent_header is set prematurely before the actual send happens. The present code in affected cupsdWriteClient() scope looks like code remains from CUPS 1.6.3, where cupsdSendHeader() is called earlier and generates the required headers by itself - the current cupsdSendHeader() sends only the headers which are saved in array fields, so the premature setting of sent_header sometimes causes not having all headers in the response.

With the change, testing via curl gives reliable results all time.

16 months agoUpdate CUPS-Add-Modify-Printer and CUPS-Create-Local-Printer code to delay
Michael R Sweet [Thu, 4 Apr 2024 18:38:34 +0000 (14:38 -0400)] 
Update CUPS-Add-Modify-Printer and CUPS-Create-Local-Printer code to delay
responding until the PPD is successfully generated (Issue #347)

16 months agoscheduler: Fix sending response headers to client 927/head
Zdenek Dohnal [Wed, 3 Apr 2024 08:39:24 +0000 (10:39 +0200)] 
scheduler: Fix sending response headers to client

Sometimes headers are not correctly copied into response to the client
(some are missing). It happens because `sent_header` is set prematurely
before the actual send happens. The present code in affected `cupsdWriteClient`
scope looks like code remains from CUPS 1.6.3.

With the change, testing via curl gives reliable results all time.

16 months agoPut it back - Github is confused.
Michael R Sweet [Wed, 3 Apr 2024 00:31:26 +0000 (20:31 -0400)] 
Put it back - Github is confused.

16 months agoRename CodeQL workflow to satisfy Github.
Michael R Sweet [Wed, 3 Apr 2024 00:21:02 +0000 (20:21 -0400)] 
Rename CodeQL workflow to satisfy Github.

16 months agoFix CodeQL-detected missing NULL check.
Michael R Sweet [Wed, 3 Apr 2024 00:10:29 +0000 (20:10 -0400)] 
Fix CodeQL-detected missing NULL check.

16 months agoUpdate default destination documentation (Issue #819)
Michael R Sweet [Tue, 2 Apr 2024 23:50:26 +0000 (19:50 -0400)] 
Update default destination documentation (Issue #819)

16 months agoMerge pull request #837 from zdohnal/fix-reasons-for-older-jobs
Michael R Sweet [Tue, 2 Apr 2024 22:55:56 +0000 (18:55 -0400)] 
Merge pull request #837 from zdohnal/fix-reasons-for-older-jobs

scheduler: Fix reasons for previously printed jobs

16 months agoFix some build issues (Issue #674)
Michael R Sweet [Tue, 2 Apr 2024 22:48:54 +0000 (18:48 -0400)] 
Fix some build issues (Issue #674)

16 months agoMerge pull request #674 from AtariDreams/ABI
Michael R Sweet [Tue, 2 Apr 2024 22:45:44 +0000 (18:45 -0400)] 
Merge pull request #674 from AtariDreams/ABI

Create shims to pass to array structures as to not pass incompatible function pointers

16 months agoMerge branch 'master' into ABI 674/head
Michael R Sweet [Tue, 2 Apr 2024 22:44:53 +0000 (18:44 -0400)] 
Merge branch 'master' into ABI

16 months agoFix 'deny everyone' example (Issue #844)
Michael R Sweet [Tue, 2 Apr 2024 21:47:49 +0000 (17:47 -0400)] 
Fix 'deny everyone' example (Issue #844)

16 months agoFix httpGets timeout handling (Issue #879)
Michael R Sweet [Tue, 2 Apr 2024 15:19:41 +0000 (11:19 -0400)] 
Fix httpGets timeout handling (Issue #879)

16 months agoDrop 'none' test (Issue #909)
Michael R Sweet [Tue, 2 Apr 2024 14:51:19 +0000 (10:51 -0400)] 
Drop 'none' test (Issue #909)

16 months agocups/request.c: Show filename in message in `cupsDoFileRequest()`
zdohnal [Tue, 2 Apr 2024 13:52:25 +0000 (15:52 +0200)] 
cups/request.c: Show filename in message in `cupsDoFileRequest()`

Show which file we tried to access in the error message, if we have issues accessing it.

Related #904

16 months agoFix the initialization and validation of checkbox and text fields in CGI forms.
Michael R Sweet [Tue, 2 Apr 2024 12:36:06 +0000 (08:36 -0400)] 
Fix the initialization and validation of checkbox and text fields in CGI forms.

16 months agoUpdate CUPS-Create-Local-Printer to preserve the existing printer based on the
Michael R Sweet [Wed, 27 Mar 2024 18:38:46 +0000 (14:38 -0400)] 
Update CUPS-Create-Local-Printer to preserve the existing printer based on the
device URI (Issue #871)

Also keep the temporary printer for up to 5 minutes without activity, and update
the state change time every time CUPS-Create-Local-Printer is called.

16 months agoFix client logging of requests.
Michael R Sweet [Wed, 27 Mar 2024 18:38:28 +0000 (14:38 -0400)] 
Fix client logging of requests.

16 months agoDon't use sanitizer on macOS due to performance issues on Github Actions servers.
Michael R Sweet [Wed, 27 Mar 2024 18:32:00 +0000 (14:32 -0400)] 
Don't use sanitizer on macOS due to performance issues on Github Actions servers.

16 months agoUpdate Windows DLL exports.
Michael R Sweet [Wed, 27 Mar 2024 17:02:55 +0000 (13:02 -0400)] 
Update Windows DLL exports.

16 months agoUpdate cupsd code to report all supported raster resolutions (Issue #901)
Michael R Sweet [Wed, 27 Mar 2024 16:42:53 +0000 (12:42 -0400)] 
Update cupsd code to report all supported raster resolutions (Issue #901)

16 months agoDrop old strlcat/cpy emulation functions.
Michael R Sweet [Wed, 27 Mar 2024 16:42:49 +0000 (12:42 -0400)] 
Drop old strlcat/cpy emulation functions.

16 months agoStop doing EUC-JP test.
Michael R Sweet [Wed, 27 Mar 2024 16:42:20 +0000 (12:42 -0400)] 
Stop doing EUC-JP test.

16 months agoFix encoding of extension values (Issue #913)
Michael R Sweet [Mon, 25 Mar 2024 22:33:34 +0000 (18:33 -0400)] 
Fix encoding of extension values (Issue #913)

16 months agoUpdate changelog and make sure we have the len==0 check for cupsRasterReadPixels...
Michael R Sweet [Mon, 25 Mar 2024 19:07:53 +0000 (15:07 -0400)] 
Update changelog and make sure we have the len==0 check for cupsRasterReadPixels as well.

16 months agoMerge pull request #914 from yetamrra/raster-write-check
Michael R Sweet [Mon, 25 Mar 2024 19:01:54 +0000 (15:01 -0400)] 
Merge pull request #914 from yetamrra/raster-write-check

Add additional parameter validation to _cupsRasterWritePixels

16 months agoAdd additional parameter validation to _cupsRasterWritePixels 914/head
Benjamin Gordon [Mon, 25 Mar 2024 15:59:21 +0000 (09:59 -0600)] 
Add additional parameter validation to _cupsRasterWritePixels

If len is 0, the function does a lot of calculations that ultimately
don't produce any output.  This can be skipped with an early return.

If cupsBytesPerLine is 0, this triggers a divide by zero if the output
isn't compressed.  This is an error on the caller's part, but it's
nicer to return an error than to crash.

16 months agocups/request.c: Show filename in message in `cupsDoFileRequest()` 912/head
Zdenek Dohnal [Fri, 22 Mar 2024 08:05:45 +0000 (09:05 +0100)] 
cups/request.c: Show filename in message in `cupsDoFileRequest()`

Show which file we tried to access in the error message, if we have
issues with accessing it.

Related #904

16 months agocups/ipp.c: Use strcmp, since attribute names are case sensitive
Zdenek Dohnal [Fri, 22 Mar 2024 05:26:40 +0000 (06:26 +0100)] 
cups/ipp.c: Use strcmp, since attribute names are case sensitive

16 months agosnmp.c: Validate input OID string for `_cupsSNMPStringToOID()`
zdohnal [Tue, 19 Mar 2024 09:41:19 +0000 (10:41 +0100)] 
snmp.c: Validate input OID string for `_cupsSNMPStringToOID()`

We can accept OID string as input in few cases (mainly via side channel) and if the crafted OID string is sent, internal function asn1_size_oid() can end up with stack buffer overflow.

The issue happens when one OID node is too large, or OID is invalid (ending with dots) - we can fix it in _cupsSNMPStringToOID() by checking if the last source character is a dot (invalid OID), and by limiting integer for OID node to 0xffff.

Fixes #905

16 months agosnmp.c: Validate input OID string for `_cupsSNMPStringToOID()` 907/head
Zdenek Dohnal [Mon, 18 Mar 2024 14:02:30 +0000 (15:02 +0100)] 
snmp.c: Validate input OID string for `_cupsSNMPStringToOID()`

We can accept OID string as input in few cases (mainly via side channel)
and if the crafted OID string is sent, internal function
`asn1_size_oid()` can end up with stack buffer overflow.

The issue happens when one OID node is too large, or OID is invalid
(ending with dots) - we can fix it in `_cupsSNMPStringToOID()` by
checking if the last source character is a dot (invalid OID),
and by limiting integer for OID node to 0xffff.

Fixes #905

16 months agoFix get-printer-attributes test with media-col-database
zdohnal [Mon, 11 Mar 2024 11:00:47 +0000 (12:00 +0100)] 
Fix get-printer-attributes test with media-col-database

The test that is supposed to explicitly ask for requested-attributes='media-col-database' is instead asking for requested-attributes='all'

16 months agoFix get-printer-attributes test with media-col-database 908/head
Alexander Rogovskyy [Fri, 8 Mar 2024 00:11:29 +0000 (01:11 +0100)] 
Fix get-printer-attributes test with media-col-database

17 months agoFix IPv6 address encoding in the Host: header (Issue #903)
Michael R Sweet [Fri, 1 Mar 2024 16:52:38 +0000 (11:52 -0500)] 
Fix IPv6 address encoding in the Host: header (Issue #903)

17 months agoUpdate cupsCreateRequestedArray for Get-Output-Device-Attributes. 897/head
Michael R Sweet [Fri, 16 Feb 2024 18:01:28 +0000 (13:01 -0500)] 
Update cupsCreateRequestedArray for Get-Output-Device-Attributes.

17 months agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 15 Feb 2024 17:12:01 +0000 (18:12 +0100)] 
Update CHANGES.md

17 months agoppd-cache.c: Check for required attributes if URF or PWG Raster are found
zdohnal [Thu, 15 Feb 2024 12:45:34 +0000 (13:45 +0100)] 
ppd-cache.c: Check for required attributes if URF or PWG Raster are found

Some devices have image/urf in document-format-supported, but is missing urf-supported if AirPrint support is turned off, which breaks PPD generation.

Check for attribute urf-supported when we are about to decide whether the printer uses AirPrint, so in case the device supports another driverless standard, we can use it for PPD generation.

Apply the same for PWG Raster too.

Fixes Fedora issue #2263053

17 months agoMention reporting issues earlier
Zdenek Dohnal [Thu, 15 Feb 2024 06:50:34 +0000 (07:50 +0100)] 
Mention reporting issues earlier

17 months agoFix typo in workaround.
Michael R Sweet [Wed, 14 Feb 2024 15:26:07 +0000 (10:26 -0500)] 
Fix typo in workaround.

17 months agoAdd proposed workaround for Github Actions CI test on macOS.
Michael R Sweet [Wed, 14 Feb 2024 15:19:39 +0000 (10:19 -0500)] 
Add proposed workaround for Github Actions CI test on macOS.

17 months agoppd-cache.c: Check for PWG attribute as well 890/head
Zdenek Dohnal [Wed, 14 Feb 2024 14:38:01 +0000 (15:38 +0100)] 
ppd-cache.c: Check for PWG attribute as well

If the device reports image/pwg-raster and we are about to use it, check
for pwg-raster-document-resolution-supported too.

17 months agoppd-cache.c: Check for `urf-supported` if `image/urf` is found
Zdenek Dohnal [Tue, 13 Feb 2024 07:20:52 +0000 (08:20 +0100)] 
ppd-cache.c: Check for `urf-supported` if `image/urf` is found

Some devices have `image/urf` in `document-format-supported`, but is
missing `urf-supported` if AirPrint support is turned off, which breaks
PPD generation.

Check for attribute `urf-supported` when we are about to decide whether
the printer uses AirPrint, so in case the device supports another
driverless standard, we can use it for PPD generation.

Fixes [Fedora issue](https://bugzilla.redhat.com/show_bug.cgi?id=2263053)

17 months agoUpdate CHANGES.md
Zdenek Dohnal [Wed, 14 Feb 2024 13:10:39 +0000 (14:10 +0100)] 
Update CHANGES.md

17 months agoUse PAM password-auth or system-auth if present
zdohnal [Wed, 14 Feb 2024 13:08:06 +0000 (14:08 +0100)] 
Use PAM password-auth or system-auth if present

Enables possibility to use PAM modules password-auth or system-auth if they exist during compilation. password-auth module is for remote authentication and system-auth for local authentication.

17 months agoUse PAM password-auth or system-auth if present 892/head
Zdenek Dohnal [Wed, 14 Feb 2024 08:35:05 +0000 (09:35 +0100)] 
Use PAM password-auth or system-auth if present

This PR is actually based on one really old patch we have in Fedora,
which enables possibility to use PAM modules password-auth or
system-auth if they exist during compilation.

Those PAM modules looks to be used for remote, respective local
authentication, in Linux. Would it be possible to add their support into
CUPS?

17 months agoPause running unit tests on macOS until we figure out what is wrong with the Github...
Michael R Sweet [Mon, 12 Feb 2024 00:50:29 +0000 (19:50 -0500)] 
Pause running unit tests on macOS until we figure out what is wrong with the Github builder...

17 months agoUpdate Windows DLL exports.
Michael R Sweet [Mon, 12 Feb 2024 00:31:10 +0000 (19:31 -0500)] 
Update Windows DLL exports.

17 months agoReturn HTTP status 404 for non-existing classes and printers (Issue #423)
Michael R Sweet [Sun, 11 Feb 2024 14:21:43 +0000 (09:21 -0500)] 
Return HTTP status 404 for non-existing classes and printers (Issue #423)

17 months agoMerge pull request #887 from alexpevzner/cups-pzz-master-fix-warnings
Alexander Pevzner [Fri, 9 Feb 2024 04:31:28 +0000 (07:31 +0300)] 
Merge pull request #887 from alexpevzner/cups-pzz-master-fix-warnings

Fixed a couple of gcc warnings

17 months agoFixed gcc warning 887/head
Alexander Pevzner [Thu, 8 Feb 2024 08:49:02 +0000 (11:49 +0300)] 
Fixed gcc warning

In cups/dest.c:

    dest.c:1830:21: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
     1733 |       DEBUG_printf(("1cupsGetNamedDest: Using name=\"%s\"...", name));
  |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is really true, and gcc was smart enough to deduct it from context.
Obviously, we meant to print dest_name here.

17 months agoUpdate CHANGELOG.md
Zdenek Dohnal [Thu, 8 Feb 2024 08:58:51 +0000 (09:58 +0100)] 
Update CHANGELOG.md

17 months agoAdd unidir USB quirk for Oki 407
zdohnal [Thu, 8 Feb 2024 08:55:22 +0000 (09:55 +0100)] 
Add unidir USB quirk for Oki 407

Fixes #877

17 months agoAdd unidir USB quirk for Oki 407 886/head
Zdenek Dohnal [Tue, 6 Feb 2024 13:58:11 +0000 (14:58 +0100)] 
Add unidir USB quirk for Oki 407

Fixes #877

18 months agoMerge pull request #881 from OpenPrinting/dependabot/github_actions/microsoft/setup...
Michael R Sweet [Thu, 1 Feb 2024 15:05:42 +0000 (10:05 -0500)] 
Merge pull request #881 from OpenPrinting/dependabot/github_actions/microsoft/setup-msbuild-2.0.0

build(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0

18 months agobuild(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0 881/head
dependabot[bot] [Thu, 1 Feb 2024 10:41:09 +0000 (10:41 +0000)] 
build(deps): bump microsoft/setup-msbuild from 1.3.1 to 2.0.0

Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.3.1 to 2.0.0.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1.3.1...v2.0.0)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoMirror fix from libcups.
Michael R Sweet [Wed, 31 Jan 2024 15:27:00 +0000 (10:27 -0500)] 
Mirror fix from libcups.

18 months agoscheduler: Fix reasons for previously printed jobs 837/head
Zdenek Dohnal [Fri, 19 Jan 2024 12:35:53 +0000 (13:35 +0100)] 
scheduler: Fix reasons for previously printed jobs

Before #832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.

18 months agoscheduler: Fix reasons for previously printed jobs
Zdenek Dohnal [Mon, 27 Nov 2023 11:49:57 +0000 (12:49 +0100)] 
scheduler: Fix reasons for previously printed jobs

Before #832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.

18 months agoRemove excess debugging (Issue #875)
Michael R Sweet [Thu, 25 Jan 2024 02:29:02 +0000 (21:29 -0500)] 
Remove excess debugging (Issue #875)

18 months agoCopy string copy/concat/format changes from libcups v3.
Michael R Sweet [Thu, 25 Jan 2024 02:22:55 +0000 (21:22 -0500)] 
Copy string copy/concat/format changes from libcups v3.

Remove all unnecessary string function checks.

Remove old snprintf emulation functions (now require C99 which always has it)

18 months agobackend/ipp.c: Fix printing jobs with long names on older IPP printers
zdohnal [Tue, 16 Jan 2024 12:27:10 +0000 (13:27 +0100)] 
backend/ipp.c: Fix printing jobs with long names on older IPP printers

On older printers (ones which don't support IPP operation Create-Job) we concatenate job number and title into one string, which we use as IPP attribute job-name. If the original title was almost 255 chars, the joining the strings will overflow maximal required length for this attribute, and Validate-Job fails.

We could check whether the string is longer than 255 and cut it, but I chose to shrink the buffer to 256, since we already use snprintf() which will cut the string and put null terminator for us.

Fixes #644

18 months agobackend/ipp.c: Fix printing jobs with long names on older IPP printers 866/head
Zdenek Dohnal [Tue, 16 Jan 2024 07:31:15 +0000 (08:31 +0100)] 
backend/ipp.c: Fix printing jobs with long names on older IPP printers

On older printers (ones which don't support IPP operation Create-Job)
we concatenate job number and title into one string, which we use as
IPP attribute job-name. If the original title was almost 255 chars,
the joining the strings will overflow maximal required length
for this attribute, and Validate-Job fails.

We could check whether the string is longer than 255 and cut it,
but I chose to shrink the buffer to 256, since we already use snprintf()
which will cut the string and put null terminator for us.

Fixes #644

18 months agobackend/ipp.c: Fix infinite loop with Kerberos
zdohnal [Mon, 15 Jan 2024 15:00:56 +0000 (16:00 +0100)] 
backend/ipp.c: Fix infinite loop with Kerberos

If IP address was used with Kerberos, IPP backend retried connection indefinitely. The fix is to abort when we find out hostname is an IP address and we require Kerberos.

Fixes #838

18 months agobackend/ipp.c: Fix infinite loop with Kerberos 864/head
Zdenek Dohnal [Mon, 15 Jan 2024 14:14:24 +0000 (15:14 +0100)] 
backend/ipp.c: Fix infinite loop with Kerberos

If IP address was used with Kerberos, IPP backend retried connection
indefinitely. The fix is to abort when we find out hostname is an IP
address and we require Kerberos.

Fixes #838

18 months agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 15 Jan 2024 13:08:54 +0000 (14:08 +0100)] 
Update CHANGES.md

18 months agoMerge pull request #860 from ValdikSS/master
Michael R Sweet [Fri, 12 Jan 2024 21:49:40 +0000 (16:49 -0500)] 
Merge pull request #860 from ValdikSS/master

Report proper media-source-supported IPP field on numeric InputSlots

18 months agoFix whitespace error
Zdenek Dohnal [Fri, 12 Jan 2024 09:47:40 +0000 (10:47 +0100)] 
Fix whitespace error

18 months agoAdd/update copyrights
Zdenek Dohnal [Fri, 12 Jan 2024 08:02:01 +0000 (09:02 +0100)] 
Add/update copyrights

18 months agoFix print-scaling option support for IPP printers (Issue #862)
Michael R Sweet [Wed, 10 Jan 2024 20:42:16 +0000 (15:42 -0500)] 
Fix print-scaling option support for IPP printers (Issue #862)

18 months agoReport proper media-source-supported IPP field on numeric InputSlots. #859 860/head
ValdikSS [Tue, 9 Jan 2024 01:21:52 +0000 (04:21 +0300)] 
Report proper media-source-supported IPP field on numeric InputSlots. #859

Windows 11 version 22H2 build 22621.2861 silently fails to add Mopria
auto-discovered printer if it reports a number (a digit as a string)
in media-source-supported field.
If you try to add such a printer using modern control panel, it will
show endless "connecting…" message, and if you add it using old
control panel, it would be added "successfully", but under
"unrecognized" device type, and you won't be able to print on it.

Fix the issue by
    * By comparing also by human-readable InputSlot name
    * By mapping number to "tray-N" string

19 months agoFix CI for CUPS 2.5
zdohnal [Fri, 5 Jan 2024 06:21:13 +0000 (07:21 +0100)] 
Fix CI for CUPS 2.5

Fixing deadlock and infinite loop in `cups_enum_dests()` - more info in specific commits.

19 months agodnssd.c: Fix deadlock in `cups_enum_dests()` 857/head
Zdenek Dohnal [Thu, 4 Jan 2024 12:58:42 +0000 (13:58 +0100)] 
dnssd.c: Fix deadlock in `cups_enum_dests()`

Deadlock happens when we are about to destroy DNSSD struct by the end
of `cups_enum_dests()`. The main thread locks the mutex when the other
thread is in avahi poll callback at function `poll()` and unlocked the
mutex before - the other thread tries to lock the mutex once poll
timeout expires, but it cannot because it was locked by the main thread
and wait there. Meanwhile the main thread tries to cancel the other
thread, but the function where the other thread is not a cancellation
point, thus the cancel event is ignored and the main thread thread waits
indefinitely for the end of the other thread.

We can make the other thread asynchronous (which would cancel the thread
immediately) or release the mutex earlier in `cupsDNSSDDelete()`. The
commit does the latter.

Fixes CI for Linux