Skip to content

Commit 9dd2747

Browse files
Merge pull request #332 from gliderlabs/master
release v0.3.35
2 parents edf0236 + ae2936a commit 9dd2747

File tree

8 files changed

+54
-6
lines changed

8 files changed

+54
-6
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ All notable changes to this project will be documented in this file.
1010

1111
### Changed
1212

13+
## [0.3.35] - 2018-02-09
14+
### Added
15+
- @davidkarlsen Be able to opt out from setuidgid - needed when not running as root initially
16+
17+
### Changed
18+
- @michaelshobbs Update go to version v83
19+
- @michaelshobbs Update nodejs to version v118
20+
21+
1322
## [0.3.34] - 2018-01-30
1423
### Added
1524
- @josegonzalez feat: update all installed service dependencies when building the docker image

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM heroku/cedar:14
2-
RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.3.34/herokuish_0.3.34_linux_x86_64.tgz" \
2+
RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.3.35/herokuish_0.3.35_linux_x86_64.tgz" \
33
--silent -L | tar -xzC /bin
44
RUN apt-get update && apt-get -qq -y --force-yes dist-upgrade && apt-get clean && rm -rf /var/cache/apt/archives/*
55
RUN /bin/herokuish buildpack install \

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME = herokuish
22
HARDWARE = $(shell uname -m)
3-
VERSION ?= 0.3.34
3+
VERSION ?= 0.3.35
44
IMAGE_NAME ?= $(NAME)
55
BUILD_TAG ?= dev
66

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Download and uncompress the latest binary tarball from [releases](https://github
1818
For example, you can do this directly in your Dockerfiles installing into `/bin` as one step:
1919

2020
```
21-
RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.3.34/herokuish_0.3.34_linux_x86_64.tgz \
21+
RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.3.35/herokuish_0.3.35_linux_x86_64.tgz \
2222
| tar -xzC /bin
2323
```
2424

@@ -56,6 +56,9 @@ Main functionality revolves around buildpack commands, procfile/exec commands, a
5656

5757
For example, build processes that produce Docker images without producing intermediary slugs can ignore slug commands. Similarly, non-buildpack runtime images such as [google/python-runtime](https://github.com/GoogleCloudPlatform/python-docker/tree/master/runtime) might find procfile commands useful just to support Procfiles.
5858

59+
`herokuish exec` will by default drop root privileges through use of [setuidgid](https://cr.yp.to/daemontools/setuidgid.html),
60+
but if already running as a non-root user setuidgid will fail, you can opt-out from this by setting the env-var `HEROKUISH_SETUIDGUID=false`.
61+
5962
#### Buildpacks
6063

6164
Herokuish does not come with any buildpacks, but it is tested against recent versions of Heroku supported buildpacks. You can see this information with `herokuish version`. Example output:
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v81
1+
v83
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v116
1+
v118

include/procfile.bash

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ procfile-exec() {
5252
cd "$app_path" || return 1
5353
# unprivileged_user is defined in outer scope
5454
# shellcheck disable=SC2154,SC2046
55-
exec setuidgid "$unprivileged_user" $(eval echo "$@")
55+
if [[ "$HEROKUISH_SETUIDGUID" == "false" ]]; then
56+
exec $(eval echo "$@")
57+
else
58+
exec setuidgid "$unprivileged_user" $(eval echo "$@")
59+
fi
5660
}
5761

5862
procfile-types() {

tests/unit/tests.sh

+32
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,35 @@ T_procfile-load-profile() {
109109
return 1
110110
fi
111111
}
112+
113+
#the following two tests needs to launch an invalid command,
114+
#or else shell is hijacked by suceeding exec, so rather than no test
115+
#it is better to pass a failing cmd, so that we can check we pass exec step
116+
T_procfile-exec() {
117+
# shellcheck disable=SC1090
118+
source "$(dirname "${BASH_SOURCE[0]}")/../../include/procfile.bash"
119+
local expected actual
120+
121+
actual=procfile-exec invalid
122+
expected=".*invalid: command not found.*"
123+
124+
if [[ "$actual" =~ $expected ]]; then
125+
echo "$actual =~ $expected"
126+
return 1
127+
fi
128+
}
129+
130+
T_procfile-exec-setuidgid-optout() {
131+
# shellcheck disable=SC1090
132+
source "$(dirname "${BASH_SOURCE[0]}")/../../include/procfile.bash"
133+
local expected actual
134+
135+
HEROKUISH_SETUIDGUID=false
136+
actual=procfile-exec invalid
137+
expected=".*invalid: command not found.*"
138+
139+
if [[ "$actual" =~ $expected ]]; then
140+
echo "$actual =~ $expected"
141+
return 1
142+
fi
143+
}

0 commit comments

Comments
 (0)