Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 279275

Summary: net-proxy/ntlmaps-0.9.9.6: no error reporting
Product: Gentoo Linux Reporter: crusaderky
Component: Current packagesAssignee: Gentoo Network Proxy Developers (OBSOLETE) <net-proxy+disabled>
Status: RESOLVED UPSTREAM    
Severity: normal CC: eos
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description crusaderky 2009-07-27 08:19:18 UTC
ntlmaps misteriously stopped working on my box.
/etc/init.d/ntlmaps start, however, continued giving out a [OK] message. 
So I checked out /var/log/ntlmaps, which was completely empty.

In order to figure out what the hell was happening, I had to manually run:

export PID_FILE="/var/run/ntlmaps.pid"
touch ${PID_FILE}
chown ntlmaps:ntlmaps ${PID_FILE}
start-stop-daemon --background --exec /usr/bin/python \
--make-pidfile --pidfile ${PID_FILE} --chuid ntlmaps -- /usr/bin/ntlmaps < /dev/null

only to find out that I had incorrectly set the permissions of the config files in /etc/ntlmaps to root:root 640, while the daemon was run as user ntlmaps so it couldn't access them any more.

Expected behaviour:
1)since the process crashes immediately, I expect that /etc/init.d/ntlmaps returns [ERROR].
2)the crash message should be either written in the console when I run /etc/init.d/ntlmaps, and/or in /var/log/ntlmaps.
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2009-08-16 12:41:51 UTC
ntlmaps doesn't fork itself when executed, so we have to use start-stop-daemon --background in order to run it as a service.

In any case, the fault is yours. By default, /etc/ntlmaps/server.cfg is installed with these permissions:
-rw-r----- 1 root ntlmaps 8523 2009-08-16 14:20 server.cfg

Closed with UPSTREAM resolution.
Comment 2 Richard 2010-04-12 01:44:34 UTC
I've been living with this for about a year - I worked around it by having ntlmaps run (as root) in a start-up script.

I agree with the original poster - the only indication that something is wrong is the fact that it doesn't work and /etc/init.d/ntlmaps status returns "crashed" - BIG thanks to crusaderky btw.

I spent ages trying to get more information on it, modifying the daemon init script etc... 

I personally have no idea how the permissions were changed on the file and in my efforts i failed to notice the --chuid ntlmaps

I understand that it's almost definitely my fault, but wouldn't it be better to state that something has gone wrong and the cause than to cheerfully say [ ok ] and leave the user scratching their head?

Anyway... pretty please? 
Comment 3 Richard 2010-04-12 01:49:03 UTC
I'd like to propose this as an Enhancement, for the benefit of future idiots like myself.

I've been living with this for about a year - I worked around it by having ntlmaps run (as root) in a start-up script.

I agree with the original poster - the only indication that something is wrong is the fact that it doesn't work and /etc/init.d/ntlmaps status returns "crashed" - BIG thanks to crusaderky for the fix btw.

I spent ages trying to get more information on it, modifying the daemon init script, log-diving etc... 

I personally have no idea how the permissions were changed on the file and in my efforts i failed to notice the --chuid ntlmaps (I assumed that it was run as root)

I understand that it's almost definitely my fault, but wouldn't it be better to state that something has gone wrong and the cause than to cheerfully say [ ok ] and leave the user scratching their head?

Anyway... pretty please?