Use setuidgids instead of sudo -u for setting groups

This commit is contained in:
Peter Johnson
2018-11-30 19:58:54 -08:00
parent d0c39e088b
commit e2e18ddbc0
5 changed files with 57 additions and 1 deletions
+2
View File
@@ -16,6 +16,8 @@ install -m 644 files/raspi-blacklist.conf "${ROOTFS_DIR}/etc/modprobe.d/"
install -m 644 files/frc.json "${ROOTFS_DIR}/boot/"
install -m 755 extfiles/setuidgids "${ROOTFS_DIR}/usr/local/bin/"
install -m 755 -o 1000 -g 1000 extfiles/multiCameraServer "${ROOTFS_DIR}/home/pi/"
cat extfiles/jdk_11.0.1-strip.tar.gz | sh -c "mkdir -p ${ROOTFS_DIR}/usr/lib/jvm && cd ${ROOTFS_DIR}/usr/lib/jvm/ && tar xzf - --exclude=\*.diz --exclude=src.zip --transform=s/^jdk/jdk-11.0.1/"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh
sleep 1
cd /home/pi
exec pgrphack sudo -u pi /usr/local/bin/netconsoleServer -u ./runCamera
exec pgrphack /usr/local/bin/setuidgids pi /usr/local/bin/netconsoleServer -u ./runCamera