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

doing 'ls -l' on synlink will always show lrwxrwxrwx on Solaris #1506

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/t/lib/ProFTPD/Tests/Commands/LIST.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,12 @@ sub list_symlink_issue940 {
}

my $file = 'src.link -> dst.d';
my $expected = 'lrwxr-xr-x';
my $expected;
if ($^O eq 'solaris') {
$expected = 'lrwxrwxrwx';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. I hate inconsistencies like this. Why is Solaris so different from other platforms in this manner? It only adds to brittleness of maintenance of things like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are more those platforms bends for other solaris cases. In case of lrwxrwxrwx symlink match there is similar platform hack used for linux in t/lib/ProFTPD/Tests/Config/ShowSymlinks.pm here:

 463 
 464       # Different platforms' Perl create symlinks with different perms
 465       my $expected_perms = 'lrwxr-xr-x';
 466       if ($^O eq 'linux') {
 467         $expected_perms = 'lrwxrwxrwx';
 468       }
 469 

snippet comes from current proftpd source code.

} else {
$expected = 'lrwxr-xr-x';
}
$self->assert($res->{$file} eq $expected,
test_msg("Expected '$expected', got '$res->{$file}' for '$file'"));

Expand Down