Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not open logfiles with read access #291

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cups/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ cupsFileNumber(cups_file_t *fp) /* I - CUPS file */
*
* The "mode" parameter can be "r" to read, "w" to write, overwriting any
* existing file, "a" to append to an existing file or create a new file,
* "a+" to append to and read from an existing file or create a new file,
* or "s" to open a socket connection.
*
* When opening for writing ("w"), an optional number from 1 to 9 can be
Expand Down Expand Up @@ -1101,7 +1102,7 @@ cupsFileOpen(const char *filename, /* I - Name of file */
{
case 'a' : /* Append file */
fd = cups_open(filename,
O_RDWR | O_CREAT | O_APPEND | O_LARGEFILE | O_BINARY);
(mode[1] == '+' ? O_RDWR : O_WRONLY) | O_CREAT | O_APPEND | O_LARGEFILE | O_BINARY);
break;

case 'r' : /* Read file */
Expand Down