When I run '/etc/init.d/cntlm stop' cntlm doesn't actually stop, while rc-status shows it as stopped. It has to be killed manually if I want to start it again.
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 :)