Summary: | net-proxy/cntlm init script doesn't stop the daemon | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexey Sarychev <alx_s> |
Component: | Current packages | Assignee: | Markus Duft (RETIRED) <mduft> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | martin.holzer |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for /etc/init.d/cntlm
Another fix. |
Description
Alexey Sarychev
2010-03-02 19:49:22 UTC
Created attachment 221853 [details, diff]
Patch for /etc/init.d/cntlm
This patch fixes the problem by not using pidfile for cntlm daemon.
The problem with pidfile - if pidfile is created by /sbin/start-stop-daemon then it contains wrong pid - cntlm forks a background child and the parent is exiting while start-stop-daemon puts parent's pid into the pidfile.
If cntlm -P option is used to create a pidfile, then it requires /var/run to be writable by cntlm user, as cntlm will try to create the pidfile only after it changed it's UID to unprivileged cntlm user.
So killing cntlm by process name instead of PID will work, unless you are running multiple cntlm daemons under the same user account and want to be able to start/stop them separately.
Created attachment 221855 [details, diff]
Another fix.
Another fix - this time by telling cntlm to not fork into background - this way standard pidfile logic will work. So take your pick. :)
any news on this ? The latest patch is working, I made it on the same way as Alexy, and it works for me well. applied. thanks for the valid fix alexey :) |