ssh-bridge 1.1.1: root-created /data/crontabs/bridge (busybox crontab not setuid); expose via /etc/crontabs + /var/spool/cron/crontabs symlinks
This commit is contained in:
1 parent
685b3542e9
commit
5e9be625ec
2 files changed
+11
-3
No files matched your search
+10
-2
@@ -39,9 +39,17 @@ else
|
||||
echo "WARN: /share/ssh-bridge/tailscale_authkey missing; tailscale node not registered"
|
||||
fi
|
||||
|
||||
# --- busybox crond with a persistent crontab spool (user-owned crontabs,
|
||||
# e.g. bridge's fleet supervise entry). -b daemonizes; logs to /data.
|
||||
# --- busybox crond with a persistent crontab spool.
|
||||
# busybox crontab(1) is not setuid, so the unprivileged bridge user cannot
|
||||
# install its own crontab; create it here as root instead. The line is fixed
|
||||
# forever — the script it runs lives in bridge's home and is freely editable.
|
||||
cat > /data/crontabs/bridge <<'EOF'
|
||||
* * * * * $HOME/.config/fleet/supervise.sh >/dev/null 2>&1
|
||||
EOF
|
||||
chown bridge:bridge /data/crontabs/bridge
|
||||
chmod 600 /data/crontabs/bridge
|
||||
ln -sfn /data/crontabs /var/spool/cron/crontabs
|
||||
ln -sfn /data/crontabs /etc/crontabs
|
||||
crond -b -l 6 -L /data/cron.log
|
||||
|
||||
# --- sshd host key (generated once, kept in /data; never regenerate —
|
||||
|
||||
Reference in new issue
Block a user