Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 300: delete the contents of $tmpdir after creating it #301

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

realtime-neil
Copy link
Contributor

No description provided.

@realtime-neil
Copy link
Contributor Author

@megastep the suidtest is failing because it apparently depends on the target directory not being emptied prior to extraction?

Can you help me understand the use case that requires the preservation of files (suid or otherwise) within the target directory?

@megastep
Copy link
Owner

megastep commented Apr 1, 2023

While I didn't write this test myself, it appears it is failing because the file disappearing would make the comparison of the permissions before and after extraction fail. Obviously a removed file no longer has permissions...

@megastep
Copy link
Owner

megastep commented Apr 1, 2023

I think this was meant to test that Makeself wouldn't overwrite permissions of any existing files after extraction. So in that sense obliterating the whole directory would break this. If we explicitly allow for this possibility when using certain command line flags maybe that test should be revised.

@megastep
Copy link
Owner

megastep commented Apr 1, 2023

Maybe a simple solution would be to have the suidtest use the --notemp argument.

@realtime-neil
Copy link
Contributor Author

Maybe a simple solution would be to have the suidtest use the --notemp argument.

Can do. On it...

@realtime-neil
Copy link
Contributor Author

realtime-neil commented Apr 4, 2023

@megastep , I think #300 and suidtest are fundamentally incompatible.

The suidtest places a file within the extraction directory and asserts a very specific mode bit (the SUID bit) thereon is preserved during extraction.

In issue #300, @belonesox proposes the non-temporary extraction directory should be emptied just prior to extraction.

I can admit my bias is with the status quo in this conflict: the simplest thing to do during extraction is nothing at all and doing nothing at all means not cleaning the extraction directory prior to extraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants