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

cupsd crashes because CloseClient does not reset con->pipe_pid #1290

Closed
michaelrsweet opened this issue Oct 5, 2005 · 2 comments
Closed
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.23
CUPS.org User: twaugh.redhat

When CloseClient is called on an encrypted connection, con->pipe_pid is not reset but con->file is, and the connection is not destroyed.

Later, in main(), this line segfaults:

 /*
  * Write data as needed...
  */

  if (con->pipe_pid && FD_ISSET(con->file, input))

To cause this to happen, just reload https://cupsserver:631/printers/testprinter (for example) quickly several times when /printers has 'Encryption required' in cupsd.conf.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

Good catch, and thanks for the fix!

@michaelrsweet
Copy link
Collaborator Author

"cups-pipe_pid.patch":

--- cups-1.1.23/scheduler/client.c.pipe_pid 2005-10-05 13:28:05.000000000 +0100
+++ cups-1.1.23/scheduler/client.c 2005-10-05 13:28:43.000000000 +0100
@@ -462,6 +462,7 @@
LogMessage(L_DEBUG2, "CloseClient: %d Killing process ID %d...",
con->http.fd, con->pipe_pid);
kill(con->pipe_pid, SIGKILL);

  • con->pipe_pid = 0;
    }

if (con->file >= 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant