Skip to content

Commit

Permalink
[baseimage] Adding setuid permissions to ping binaries, so sudo is no…
Browse files Browse the repository at this point in the history
… longer needed (#1765)
  • Loading branch information
qiluo-msft authored Jun 5, 2018
1 parent b58a94d commit d54a7ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/libwrap0_*.deb || \
## Disable kexec supported reboot which was installed by default
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec

## Fix ping tools permission so non root user can directly use them
## Note: this is a workaround since aufs doesn't support extended attributes
## Ref: https://github.com/moby/moby/issues/5650#issuecomment-303499489
## TODO: remove workaround when the overlay filesystem support extended attributes
sudo chmod u+s $FILESYSTEM_ROOT/bin/ping{,6}

## Remove sshd host keys, and will regenerate on first sshd start
sudo rm -f $FILESYSTEM_ROOT/etc/ssh/ssh_host_*_key*
sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/
Expand Down

0 comments on commit d54a7ae

Please sign in to comment.