Handle hostnames with upper-case letters
[webmin.git] / file / getext.cgi.bak
1 #!/usr/local/bin/perl
2 # getext.cgi
3 # Returns a string of EXT attributes for some file
4
5 require './file-lib.pl';
6 &ReadParse();
7 &switch_acl_uid();
8 print "Content-type: text/plain\n\n";
9 if (!&can_access($in{'file'})) {
10         print $text{'facl_eaccess'},"\n";
11         }
12 else {
13         $out = `lsattr -d '$in{'file'}' 2>&1`;
14         if ($? || $out !~ /^(\S+)\s/) {
15                 print $out,"\n";
16                 }
17         else {
18                 print "\n";
19                 @a = split(//, $1);
20                 print join("", grep { $_ ne '-' } @a),"\n";
21                 }
22         }
23
24