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

maniadd() can make files writeable even to make no effective change. #13

Open
kentfredric opened this issue Apr 6, 2015 · 0 comments
Open

Comments

@kentfredric
Copy link

I'm just going to start cataloguing the bugs as I find then in test re-factoring.

There's a test in Manifest.t that ensures maniadd() does not attempt to write to the file if an entry already exists, and that adding an entry that doesnt exist causes a fatal exception to occur.

However, maniadd inside it calls this horrible function called _fix_manifest, which munges the state of the manifest on disk prior to maniadd actually doing anything.

This in turn can silently cause the file to be marked writeable, and the expected failure of maniadd vanishes.

repro steps:

   path("MANIFEST")->spew_raw("foo #bar");
   chmod(0400, "MANIFEST");
   maniadd({ foo => "bar" });  # no fatals
   die "Is now writeable" if -w "MANIFEST"
kentfredric added a commit to kentfredric/ExtUtils-Manifest that referenced this issue Apr 6, 2015
kentfredric added a commit to kentfredric/ExtUtils-Manifest that referenced this issue Apr 6, 2015
kentfredric added a commit to kentfredric/ExtUtils-Manifest that referenced this issue Apr 6, 2015
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

No branches or pull requests

1 participant