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

File::Temp::HIGH relies on a bogus _PC_CHOWN_RESTRICTED check #36

Open
veprbl opened this issue Oct 3, 2021 · 0 comments · May be fixed by #41
Open

File::Temp::HIGH relies on a bogus _PC_CHOWN_RESTRICTED check #36

veprbl opened this issue Oct 3, 2021 · 0 comments · May be fixed by #41

Comments

@veprbl
Copy link

veprbl commented Oct 3, 2021

This logic shoves a flag from pathconf() into sysconf(), allegedly, to check the value of _POSIX_CHOWN_RESTRICTED:

File-Temp/lib/File/Temp.pm

Lines 745 to 752 in 2847f33

$chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED()
if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1};
# If chown_resticted is set to some value we should test it
if (defined $chown_restricted) {
# Return if the current directory is safe
return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted );

Apparently what happens in reality is a call to sysconf(_SC_TZNAME_MAX).

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 a pull request may close this issue.

1 participant