]> iEval git - gruntmaster-daemon.git/commitdiff
Change gruntmaster-exec setuid user/group in ex/makevm
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 23 Jan 2015 19:15:26 +0000 (21:15 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 23 Jan 2015 19:16:07 +0000 (21:16 +0200)
ex/makevm

index 81fbde81fa96a9a3cd57506ff7314137955eff17..7da2614a0615365b5411365938f585eea34f66fd 100755 (executable)
--- a/ex/makevm
+++ b/ex/makevm
@@ -1,4 +1,7 @@
 #!/bin/bash
+GROUP=$(getent group www-data | cut -f3 -d:)
+USER=$(getent passwd www-data | cut -f3 -d:)
+
 rm -rf vm/ vm.squashfs
 multistrap -f ex/vm.conf
 ln -s vm/usr/bin/mawk vm/bin/awk
@@ -17,6 +20,7 @@ squashfs
 9pnet_virtio
 EOF
 install gruntmaster-exec gruntmaster-compile vm/usr/bin/
+sed -i -e "s/setgid 65534/setgid $GROUP/" -e "s/setuid 65534/setuid $USER/" vm/usr/bin/gruntmaster-exec
 chroot vm update-initramfs -d -k 3.2.0-4-amd64
 chroot vm update-initramfs -c -k 3.2.0-4-amd64
 mksquashfs vm vm.squashfs -comp lzo
This page took 0.026402 seconds and 4 git commands to generate.