[ Avaa Bypassed ]




Upload:

Command:

www-data@3.144.134.101: ~ $
#!/usr/bin/perl
# save_acl.cgi
# Save access control options for some module

use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
our (%in, %text, %config, %access, $base_remote_user, %gconfig,
     $config_directory);
&ReadParse();

my $who;
if ($in{'_acl_group'}) {
	$access{'groups'} || &error($text{'acl_egroup'});
	$who = $in{'_acl_group'};
	}
else {
	my $me = &get_user($base_remote_user);
	my @mcan = $access{'mode'} == 1 ? @{$me->{'modules'}} :
		   $access{'mode'} == 2 ? split(/\s+/, $access{'mods'}) :
				          ( &list_modules(), "" );
	&indexof($in{'_acl_mod'}, @mcan) >= 0 || &error($text{'acl_emod'});
	&can_edit_user($in{'_acl_user'}) || &error($text{'acl_euser'});
	$who = $in{'_acl_user'};
	}

my $aclfile = $in{'_acl_group'} ? "$config_directory/$in{'_acl_mod'}/$who.gacl"
			        : "$config_directory/$in{'_acl_mod'}/$who.acl";
my %minfo = $in{'_acl_mod'} ? &get_module_info($in{'_acl_mod'})
			    : ( 'desc' => $text{'index_global'} );
if ($in{'reset'}) {
	# Just remove the .acl file
	&lock_file($aclfile);
	if ($in{'_acl_group'}) {
		# For a group
		&save_group_module_acl(undef, $in{'_acl_group'},
				       $in{'_acl_mod'}, 1);
		}
	else {
		# For a user
		&save_module_acl(undef, $in{'_acl_user'},
				 $in{'_acl_mod'},1);
		}
	&unlock_file($aclfile);
	$in{'moddesc'} = $minfo{'desc'};
	&webmin_log("reset", undef, $who, \%in);
	}
else {
	# Validate and store ACL settings
	&error_setup($text{'acl_err'});
	my %maccess;
	if (defined($in{'noconfig'})) {
		$maccess{'noconfig'} = $in{'noconfig'};
		}
	if ($in{'rbac'}) {
		# RBAC overrides everything
		$maccess{'rbac'} = 1;
		}
	elsif (-r "../$in{'_acl_mod'}/acl_security.pl") {
		# Use user inputs
		$maccess{'rbac'} = 0 if (defined($in{'rbac'}));
		&foreign_require($in{'_acl_mod'}, "acl_security.pl");
		&foreign_call($in{'_acl_mod'}, "acl_security_save",
			      \%maccess, \%in);
		}

	# Write out the ACL
	&lock_file($aclfile);
	if ($in{'_acl_group'}) {
		# For a group
		&save_group_module_acl(\%maccess, $in{'_acl_group'},
				       $in{'_acl_mod'}, 1);
		}
	else {
		# For a user
		&save_module_acl(\%maccess, $in{'_acl_user'},
				 $in{'_acl_mod'},1);
		}
	&set_ownership_permissions(undef, undef, 0640, $aclfile);
	&unlock_file($aclfile);

	if ($in{'_acl_group'}) {
		# Recursively update the ACL for all member users and groups
		# XXX ACL in DB?
		my @ulist = &list_users();
		my @glist = &list_groups();
		my ($group) = grep { $_->{'name'} eq $in{'_acl_group'} } @glist;
		&set_acl_files(\@ulist, \@glist, $in{'_acl_mod'},
			       $group->{'members'}, \%maccess);
		}

	$in{'moddesc'} = $minfo{'desc'};
	&webmin_log("acl", undef, $who, \%in);
	}
if ($config{'display'}) {
	if ($in{'_acl_group'}) {
		&redirect("edit_group.cgi?group=$in{'_acl_group'}");
		}
	else {
		&redirect("edit_user.cgi?user=$in{'_acl_user'}&readwrite=1");
		}
	}
else {
	&redirect("");
	}



Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 5.15 KB 0644
acl-lib.pl File 62.4 KB 0755
acl_security.pl File 2.33 KB 0755
backup_config.pl File 2.64 KB 0755
cert_form.cgi File 1.48 KB 0755
cert_issue.cgi File 1.69 KB 0755
cert_output.cgi File 445 B 0755
cgi_args.pl File 767 B 0755
config File 61 B 0644
config-ALL-linux File 42 B 0644
config-freebsd File 42 B 0644
config-macos File 42 B 0644
config-netbsd File 42 B 0644
config-openbsd File 42 B 0644
config-solaris-10-ALL File 46 B 0644
config-syno-linux File 51 B 0644
config.info File 258 B 0644
config.info.ar File 385 B 0644
config.info.bg File 397 B 0644
config.info.ca File 295 B 0644
config.info.cs File 265 B 0644
config.info.da File 259 B 0644
config.info.de File 273 B 0644
config.info.es File 265 B 0644
config.info.eu File 298 B 0644
config.info.fa File 394 B 0644
config.info.fr File 308 B 0644
config.info.hr File 0 B 0644
config.info.hu File 353 B 0644
config.info.it File 279 B 0644
config.info.ja File 319 B 0644
config.info.ko File 233 B 0644
config.info.ms File 248 B 0644
config.info.nl File 268 B 0644
config.info.no File 260 B 0644
config.info.pl File 270 B 0644
config.info.pt_BR File 271 B 0644
config.info.ru File 439 B 0644
config.info.sk File 278 B 0644
config.info.sv File 53 B 0644
config.info.tr File 309 B 0644
config.info.uk File 303 B 0644
config.info.zh File 47 B 0644
config.info.zh_TW File 146 B 0644
convert.cgi File 3.79 KB 0755
convert_form.cgi File 1.6 KB 0755
defaultacl File 239 B 0644
delete_group.cgi File 1.36 KB 0755
delete_groups.cgi File 1.45 KB 0755
delete_session.cgi File 485 B 0755
delete_user.cgi File 668 B 0755
delete_users.cgi File 2.93 KB 0755
edit_acl.cgi File 2.75 KB 0755
edit_group.cgi File 4.38 KB 0755
edit_pass.cgi File 1.82 KB 0755
edit_rbac.cgi File 951 B 0755
edit_sql.cgi File 3.78 KB 0755
edit_sync.cgi File 1.22 KB 0755
edit_unix.cgi File 2.76 KB 0755
edit_user.cgi File 14.2 KB 0755
feedback_files.pl File 336 B 0755
index.cgi File 8.29 KB 0755
list_sessions.cgi File 2.39 KB 0755
log_parser.pl File 1.78 KB 0755
makedn.cgi File 1.75 KB 0755
maketables.cgi File 1.23 KB 0755
md5-lib.pl File 7.58 KB 0755
module.info File 187 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 139 B 0644
module.info.ar File 193 B 0644
module.info.ar.auto File 19 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 271 B 0644
module.info.bg File 43 B 0644
module.info.bg.auto File 192 B 0644
module.info.ca File 129 B 0644
module.info.ca.auto File 19 B 0644
module.info.cs File 28 B 0644
module.info.cs.auto File 116 B 0644
module.info.da File 23 B 0644
module.info.da.auto File 115 B 0644
module.info.de File 146 B 0644
module.info.de.auto File 19 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 253 B 0644
module.info.es File 125 B 0644
module.info.es.auto File 24 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 159 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 238 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 150 B 0644
module.info.fr File 28 B 0644
module.info.fr.auto File 154 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 193 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 147 B 0644
module.info.hu File 30 B 0644
module.info.hu.auto File 152 B 0644
module.info.it File 22 B 0644
module.info.it.auto File 123 B 0644
module.info.ja File 25 B 0644
module.info.ja.auto File 137 B 0644
module.info.ko File 25 B 0644
module.info.ko.auto File 128 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 182 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 177 B 0644
module.info.ms File 120 B 0644
module.info.ms.auto File 19 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 166 B 0644
module.info.nl File 26 B 0644
module.info.nl.auto File 119 B 0644
module.info.no File 23 B 0644
module.info.no.auto File 113 B 0644
module.info.pl File 133 B 0644
module.info.pl.auto File 19 B 0644
module.info.pt File 31 B 0644
module.info.pt.auto File 126 B 0644
module.info.pt_BR File 31 B 0644
module.info.pt_BR.auto File 132 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 156 B 0644
module.info.ru File 40 B 0644
module.info.ru.auto File 190 B 0644
module.info.sk File 29 B 0644
module.info.sk.auto File 129 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 156 B 0644
module.info.sv File 26 B 0644
module.info.sv.auto File 122 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 248 B 0644
module.info.tr File 32 B 0644
module.info.tr.auto File 152 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 246 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 240 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 183 B 0644
module.info.zh File 28 B 0644
module.info.zh.auto File 106 B 0644
module.info.zh_TW File 28 B 0644
module.info.zh_TW.auto File 112 B 0644
negativeacl File 13 B 0644
openssl.cnf File 6.02 KB 0644
postinstall.pl File 996 B 0755
prefs.info File 22 B 0644
save_acl.cgi File 2.85 KB 0755
save_group.cgi File 3.76 KB 0755
save_pass.cgi File 1.72 KB 0755
save_sql.cgi File 3.38 KB 0755
save_sync.cgi File 730 B 0755
save_twofactor.cgi File 2.25 KB 0755
save_unix.cgi File 2.2 KB 0755
save_user.cgi File 11.32 KB 0755
schema.cgi File 612 B 0755
switch.cgi File 726 B 0755
system_info.pl File 2.27 KB 0644
twofactor.pl File 709 B 0755
twofactor_form.cgi File 2.01 KB 0755
useradmin_update.pl File 3.12 KB 0755
webmin.schema File 1.34 KB 0644