3 # Returns a list in URL-encode name=value format of attributes on some file
5 require './file-lib.pl';
7 &switch_acl_uid_and_chroot();
8 print "Content-type: text/plain\n\n";
9 if (!&can_access($in{'file'})) {
10 print $text{'facl_eaccess'},"\n";
13 $out = `attr -l '$in{'file'}' 2>&1`;
18 foreach $l (split(/[\r\n]+/, $out)) {
19 if ($l =~ /Attribute\s+"(.*)"/i) {
20 # Get the valid for this attribute
22 $got = `attr -g '$name' '$in{'file'}' 2>&1`;
23 if ($? || $got !~ /^(.*)\n([\0-\377]*)\n$/) {
27 push(@rv, [ $name, $2 ] );
32 print &urlize($r->[0]),"=",&urlize($r->[1]),"\n";