From 6421189ccbd6513b4141a72e40f3e9d95cb03716 Mon Sep 17 00:00:00 2001 From: Sean Coates Date: Fri, 21 Jan 2011 14:12:36 -0500 Subject: [PATCH] force su to use a shell (a daemon user might not have a shell, for example); uses same shell as in shebang line, so it should exist --- service/elasticsearch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/elasticsearch b/service/elasticsearch index aaf8600..e5adc41 100755 --- a/service/elasticsearch +++ b/service/elasticsearch @@ -465,7 +465,7 @@ checkUser() { then /sbin/runuser - $RUN_AS_USER -c "\"$REALPATH\" $2" else - su - $RUN_AS_USER -c "\"$REALPATH\" $2" + su - $RUN_AS_USER -s "/bin/sh" -c "\"$REALPATH\" $2" fi # Now that we are the original user again, we may need to clean up the lock file.