El Mon, 12 de May 2014 a las 10:53 PM, Brian May <br...@microcomaustralia.com.au> escribió:
On 13 May 2014 15:44, Cameron Norman <camerontnor...@gmail.com> wrote:
I found another use of su that may need to be added to your list. rabbitmq (oddly) wraps itself up in a shell script, /usr/sbin/rabbitmq-server, which asserts the user is root or rabbitmq, and drops down to rabbitmq if it is root (using su), then starts the actual binary. The problem with this one is that it is upstream code and cannot use s-s-d for obvious reasons.


I would imagine that the init.d script just needs to be modified to use the -c option of start-stop-daemon, and that way /usr/sbin/rabbitmq-server will be called with the correct user and won't run su.


It looks like it already does this. I assume the user running the command manually would not hurt anything, correct?

I assume that the init.d script could also call the actual binary directly.


Yeah I dealing with issues with the PID being seemingly unpredictable (for some other thing I was doing), and that is how I fixed it.

Do wonder how many packages call su in this manner though.


It seems like there is a very real use case for it, I would assume a few more than what we have seen. Certainly not anything too formidable though.

Best,
--
Cameron Norman

Reply via email to