Changes in CUPS v2.4.2 (TBA)
----------------------------
+- The `cupsFileOpen` function no longer opens files for append in read-write
+ mode (Issue #291)
- The cupsd daemon removed processing temporary queue (Issue #364)
- Fixed delay in IPP backend if GNUTLS is used and endpoint doesn't confirm
closing the connection (Issue #365)
* our own file functions allows us to provide transparent support of
* different line endings, gzip'd print files, PPD files, etc.
*
- * Copyright © 2021 by OpenPrinting.
+ * Copyright © 2021-2022 by OpenPrinting.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
switch (*mode)
{
case 'a' : /* Append file */
- fd = cups_open(filename,
- O_RDWR | O_CREAT | O_APPEND | O_LARGEFILE | O_BINARY);
+ fd = cups_open(filename, O_WRONLY | O_CREAT | O_APPEND | O_LARGEFILE | O_BINARY);
break;
case 'r' : /* Read file */
fd = cups_open(filename, O_WRONLY | O_LARGEFILE | O_BINARY);
if (fd < 0 && errno == ENOENT)
{
- fd = cups_open(filename,
- O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE | O_BINARY);
+ fd = cups_open(filename, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE | O_BINARY);
if (fd < 0 && errno == EEXIST)
fd = cups_open(filename, O_WRONLY | O_LARGEFILE | O_BINARY);
}