Add security check to fixup script
[girocco.git] / jobs / fixupd.sh
blob622b9ade63de2047dd9b2b6623d5674dfa098486
1 #!/bin/sh
3 # Read projects from named pipe fixup.fifo and fixup permissions for them
5 ## Girocco::Config::reporoot
6 reporoot="/srv/git"
7 ## Girocco::Config::chroot
8 chroot="/home/repo/j"
9 ## Girocco::Config::mirror_user
10 mirror_user="repo"
11 ## Directory with this script and fixup.sh; WARNING: COPY THEM OVER to ~root!
12 ## Otherwise, the owner of these scripts can execute anything as root.
13 fixup_dir="/root/repomgr"
15 # Girocco::Config::fixup_queue
16 FIFO='/home/repo/repomgr/jobs/fixup.fifo'
18 echo "Waiting for projects in $FIFO ..."
20 while read proj; do
21 echo "Invoking fixup for $proj"
22 "$fixup_dir/fixup.sh" "$proj" "$chroot/etc/group" "$mirror_user" &
23 done <>"$FIFO"