3 # List all filesystems and their types
5 $trust_unknown_referers = 1;
6 require './file-lib.pl';
7 print "Content-type: text/plain\n\n";
8 if (!&foreign_check("mount") || !$access{'filesystems'}) {
12 &foreign_require("mount", "mount-lib.pl");
13 @mtab = &mount::list_mounted();
14 %mtab = map { $_->[0], $_ } @mtab;
15 @fstab = &mount::list_mounts();
16 %fstab = map { $_->[0], $_ } @fstab;
17 @mounts = ( @fstab, grep { !$fstab{$_->[0]} } @mtab );
20 foreach $m (sort { length($a->[0]) <=> length($b->[0]) } @mounts) {
21 next if ($m->[0] !~ /^\//);
22 local @supp = @{$support{$m->[2]}};
24 # Work out what this filesystem supports
25 @supp = ( eval $config{$m->[2]."_acl"} ? 1 : 0,
26 eval $config{$m->[2]."_attr"} ? 1 : 0,
27 eval $config{$m->[2]."_ext"} ? 1 : 0 );
28 $support{$m->[2]} = \@supp;
31 # Check if the filesystem really does support attrs and ACLs
35 local $out = `$config{'getfacl'} '$m->[0]' 2>/dev/null`;
41 foreach $l (split(/\n/, $out)) {
44 $aclcount++ if ($l =~ /\S/);
46 $supp2[0] = 0 if (!$aclcount);
50 local $out = `attr -l '$m->[0]' 2>/dev/null`;
58 $chrooted = &make_chroot($m->[0]);
60 print join(" ", $chrooted, @$m[1..3], @supp2,
61 $mtab{$m->[0]} ? 1 : 0,
62 $fstab{$m->[0]} ? 1 : 0),"\n";