File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,15 @@ start() {
5050 HOME=${LS_HOME}
5151 export PATH HOME LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING
5252
53+ # chown doesn't grab the suplimental groups when setting the user:group - so we have to do it for it.
54+ # Boy, I hope we're root here.
55+ SGROUPS=$( grep " $LS_USER " /etc/group | grep -v " ^$LS_GROUP " | cut -d: -f1 | tr " \\ n" " ," | sed ' s/,$//' ; echo ' ' )
56+
5357 # set ulimit as (root, presumably) first, before we drop privileges
5458 ulimit -n ${LS_OPEN_FILES}
5559
5660 # Run the program!
57- nice -n ${LS_NICE} chroot --userspec $LS_USER :$LS_GROUP / sh -c "
61+ nice -n ${LS_NICE} chroot --userspec $LS_USER :$LS_GROUP --groups $SGROUPS / sh -c "
5862 cd $LS_HOME
5963 ulimit -n ${LS_OPEN_FILES}
6064 exec \" $program \" $args
You can’t perform that action at this time.
0 commit comments