Skip to content

Commit

Permalink
memlimit: Forward SSH auth creds
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Oct 2, 2023
1 parent 595fcad commit 13a0cb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/memlimit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

: "${LIMIT:=256M}"

exec systemd-run --user -t -p MemoryMax="$LIMIT" -p WorkingDirectory="$(pwd)" -- "$@"
exec systemd-run --user \
-E SSH_AUTH_SOCK="$SSH_AUTH_SOCK" -E SSH_AGENT_PID="$SSH_AGENT_PID" \
-t -p MemoryMax="$LIMIT" -p WorkingDirectory="$(pwd)" -- "$@"

0 comments on commit 13a0cb0

Please sign in to comment.