My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions

Issue 1711 attachment: 0001-Make-gerrit-initscript-specify-a-shell-when-using-su.patch (1.1 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 1b4eb23a836dc938853e2fbeb5a21dfe04ff9cd0 Mon Sep 17 00:00:00 2001
From: Will Boyd <whboyd@wesleyan.edu>
Date: Fri, 7 Dec 2012 15:41:59 -0500
Subject: [PATCH] Make gerrit initscript specify a shell when using su to
invoke gerrit so a non-/bin/sh default shell doesn't
prevent gerrit from starting

---
gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
index 413f494..fc59172 100755
--- a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
+++ b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
@@ -403,7 +403,7 @@ case "$ACTION" in
if test $UID = 0 -a -n "$GERRIT_USER" ; then
touch "$GERRIT_PID"
chown $GERRIT_USER "$GERRIT_PID"
- su - $GERRIT_USER -c "
+ su - $GERRIT_USER -s /bin/sh -c "
JAVA='$JAVA' ; export JAVA ;
$RUN_EXEC $RUN_Arg1 '$RUN_Arg2' $RUN_Arg3 $RUN_ARGS </dev/null >/dev/null 2>&1 &
PID=\$! ;
--
1.7.10.4

Powered by Google Project Hosting