Skip to content

Commit 1a0cfaa

Browse files
committed
fixed a security issue
1 parent 7054bce commit 1a0cfaa

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

bin/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ if [ "$NOT_ADMIN" = "1" ]; then
2727
else
2828
echo -e "\033[0;33mAdmin mode\033[0m"
2929
echo -e "\033[0;31mWARNING: unsafe installation, this will not create a wrapper and remove it if previously installed.\033[0m"
30-
echo -e "\033[0;31mYou will need to use 'sudo true' before using commands and set the env variable NETKIT_ADMIN to 1.\033[0m"
3130
sudo rm $NETKIT_HOME/wrapper/bin/netkit_dw
31+
sudo cp $NETKIT_HOME/wrapper/bin/fake_wrapper $NETKIT_HOME/wrapper/bin/netkit_dw
3232
fi
3333

3434
echo "Setting permissions"

bin/python/netkit_commons.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
if PLATFORM != WINDOWS:
3636
DOCKER_BIN = os.environ['NETKIT_HOME'] + '/wrapper/bin/netkit_dw'
37-
if os.environ['NETKIT_ADMIN'] == '1' and PLATFORM != WINDOWS:
38-
DOCKER_BIN = 'sudo docker'
3937

4038
SEPARATOR_WINDOWS = ' & '
4139
BASH_SEPARATOR = ' ; '

bin/wrapper/bin/fake_wrapper

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
3-
docker $@
2+
sudo true
3+
sudo docker $@

0 commit comments

Comments
 (0)