-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from awerlang/patch-1
Improve general security
- Loading branch information
Showing
4 changed files
with
33 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
/etc/init.d/warsaw start | ||
|
||
# Run Firefox as non privileged user | ||
setpriv --reuid=ff --regid=ff --init-groups --inh-caps=-all --reset-env env DISPLAY=$DISPLAY LANG=$LANG TZ=$TZ startup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "${XAUTHORITY}" ] && [ -n "${HOST_HOSTNAME}" ] | ||
then | ||
if [ "${HOSTNAME}" != "${HOST_HOSTNAME}" ] | ||
then | ||
[ -f ${XAUTHORITY} ] || touch ${XAUTHORITY} | ||
xauth add ${HOSTNAME}/unix${DISPLAY} . \ | ||
$(xauth -f /tmp/.docker.xauth list ${HOST_HOSTNAME}/unix${DISPLAY} | awk '{ print $NF }') | ||
else | ||
cp /tmp/.docker.xauth ${XAUTHORITY} | ||
fi | ||
fi | ||
runx() { | ||
XAUTHORITY=/tmp/auth "$@" | ||
} | ||
|
||
if [ ! -d ~/.mozilla ] | ||
then | ||
# sudo dbus-uuidgen > /etc/machine-id \ | ||
firefox -no-remote -CreateProfile default \ | ||
&& sudo apt update \ | ||
&& sudo apt -y upgrade \ | ||
&& sudo apt -y install /src/GBPCEFwr64.deb | ||
#else | ||
# sudo /etc/init.d/warsaw start | ||
fi | ||
sudo /etc/init.d/warsaw start | ||
cp /tmp/.docker.xauth /tmp/auth | ||
runx xauth add ${HOSTNAME}/unix${DISPLAY} . $(runx xauth list | awk '$1 !~ /localhost/ {print $3; exit}') | ||
runx xauth generate $DISPLAY . untrusted timeout 0 | ||
|
||
/usr/local/bin/warsaw/core \ | ||
&& firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br | ||
&& runx firefox -no-remote -CreateProfile default \ | ||
&& runx firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br |