Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit 5dd8d2b

Browse files
authored
Merge pull request #19 from linuxserver/execstack_fix
execstack fix
2 parents 3266527 + 474d21f commit 5dd8d2b

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,21 @@ RUN \
1414
apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 && \
1515
apt-get update && \
1616
apt-get install -y \
17+
execstack \
1718
openjdk-8-jre-headless \
1819
unifi \
1920
wget && \
2021

22+
# fix execstack warning on library
23+
execstack -c \
24+
/usr/lib/unifi/lib/native/Linux/amd64/libubnt_webrtc_jni.so && \
25+
2126
# cleanup
2227
apt-get clean && \
23-
rm -rfv /tmp/* /var/lib/apt/lists/* /var/tmp/*
28+
rm -rf \
29+
/tmp/* \
30+
/var/lib/apt/lists/* \
31+
/var/tmp/*
2432

2533
# add local files
2634
COPY root/ /

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The webui is at https://ip:8443 , setup with the first run wizard.
8686

8787
## Versions
8888

89+
+ **18.03.17:** Fix execstack warning.
8990
+ **14.10.16:** Add version layer information.
9091
+ **20.09.16** Bump to pick up ver 5.27.
9192
+ **10.09.16** Add layer badges to README.

root/etc/cont-init.d/20-config

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
#!/usr/bin/with-contenv bash
22

3-
mkdir -p /config/{data,logs,run}
4-
3+
# create our folders
4+
mkdir -p \
5+
/config/{data,logs,run}
56

7+
# create symlinks for config
68
[[ -L /usr/lib/unifi/data && ! /usr/lib/unifi/data -ef /config/data ]] && unlink /usr/lib/unifi/data
79
[[ -L /usr/lib/unifi/logs && ! /usr/lib/unifi/logs -ef /config/logs ]] && unlink /usr/lib/unifi/logs
810
[[ -L /usr/lib/unifi/run && ! /usr/lib/unifi/run -ef /config/run ]] && unlink /usr/lib/unifi/run
9-
10-
1111
[[ ! -L /usr/lib/unifi/data ]] && ln -s /config/data /usr/lib/unifi/data
1212
[[ ! -L /usr/lib/unifi/logs ]] && ln -s /config/logs /usr/lib/unifi/logs
1313
[[ ! -L /usr/lib/unifi/run ]] && ln -s /config/run /usr/lib/unifi/run
1414

15-
chown -R abc:abc /config /usr/lib/unifi
16-
17-
18-
19-
15+
# permissions
16+
chown -R abc:abc \
17+
/config \
18+
/usr/lib/unifi

root/etc/cont-init.d/30-keygen

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/usr/bin/with-contenv bash
22

3-
[[ ! -f /config/data/keystore ]] && keytool -genkey -keyalg RSA -alias unifi -keystore /config/data/keystore -storepass aircontrolenterprise -keypass aircontrolenterprise -validity 1825 -keysize 4096 -dname "cn=unfi"
4-
5-
chown abc:abc /config/data/keystore
3+
# generate key
4+
[[ ! -f /config/data/keystore ]] && \
5+
keytool -genkey -keyalg RSA -alias unifi -keystore /config/data/keystore \
6+
-storepass aircontrolenterprise -keypass aircontrolenterprise -validity 1825 \
7+
-keysize 4096 -dname "cn=unfi"
68

9+
# permissions
10+
chown abc:abc \
11+
/config/data/keystore

root/etc/services.d/unifi/run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/with-contenv bash
2+
23
cd /config || exit
4+
35
exec \
46
s6-setuidgid abc java -Xmx1024M -jar /usr/lib/unifi/lib/ace.jar start
5-

0 commit comments

Comments
 (0)