From c462fe20a2cfe73cdcec56736e0bfcc919111960 Mon Sep 17 00:00:00 2001 From: Neil Roza Date: Fri, 31 Mar 2023 13:24:44 +0000 Subject: [PATCH 1/3] Fix 300: delete the contents of $tmpdir after creating it --- makeself-header.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/makeself-header.sh b/makeself-header.sh index 17bf32d..7a4d2e8 100755 --- a/makeself-header.sh +++ b/makeself-header.sh @@ -611,6 +611,7 @@ else eval \$finish exit 1 } + find "\$tmpdir" -mindepth 1 -delete fi location="\`pwd\`" From 79dded4f14ae709875ba9df07d665ac75094097d Mon Sep 17 00:00:00 2001 From: Neil Roza Date: Tue, 4 Apr 2023 14:12:13 +0000 Subject: [PATCH 2/3] edit test/suidtest: use --notemp --- test/suidtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 test/suidtest diff --git a/test/suidtest b/test/suidtest old mode 100644 new mode 100755 index 252f79c..86a3e45 --- a/test/suidtest +++ b/test/suidtest @@ -25,7 +25,7 @@ testSuidDoesntGetBroken() { permissionsBefore=$(stat -c %A "${archive_dir}"/suidfile.bin) # We extract deployedfile, in hopes that it will not reset suid bit # from suidfile.bin - "${file_name}" + "${file_name}" --notemp assertEquals $? 0 permissionsAfter=$(stat -c %A "${archive_dir}"/suidfile.bin) # And we check that permissions match From c2b74cbb82cd287f90700be77f77727db219391e Mon Sep 17 00:00:00 2001 From: Neil Roza Date: Tue, 4 Apr 2023 14:19:43 +0000 Subject: [PATCH 3/3] edit test/suidtest: oops --- test/suidtest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/suidtest b/test/suidtest index 86a3e45..b9545ab 100755 --- a/test/suidtest +++ b/test/suidtest @@ -13,7 +13,7 @@ testSuidDoesntGetBroken() { ) # Create the self extracting that should extract deployedfile local file_name="$(mktemp -t file_name.XXXXXX)" - "${SUT}" --target "${archive_dir}" "${archive_dir}" "${file_name}" "suid test" + "${SUT}" --notemp --target "${archive_dir}" "${archive_dir}" "${file_name}" "suid test" assertEquals $? 0 # Target directory now has another file with sudo permissions # This will get broken because of chown -R @@ -25,7 +25,7 @@ testSuidDoesntGetBroken() { permissionsBefore=$(stat -c %A "${archive_dir}"/suidfile.bin) # We extract deployedfile, in hopes that it will not reset suid bit # from suidfile.bin - "${file_name}" --notemp + "${file_name}" assertEquals $? 0 permissionsAfter=$(stat -c %A "${archive_dir}"/suidfile.bin) # And we check that permissions match