diff --git a/src/mail_add b/src/mail_add index d8df7a56..2ba6dbf3 100755 --- a/src/mail_add +++ b/src/mail_add @@ -13,7 +13,7 @@ if (!$mailname || !$uid) { $ENV{PATH} = ""; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; -if (!($mailname =~ /^([a-z0-9_\+-][a-z0-9_\+\.-]+\_[a-z0-9\.-]+)$/)) { +if (!($mailname =~ /^([a-z0-9_\+\-][a-z0-9_\+\.\-]+\_[a-z0-9\.-]+)$/)) { die "Email is incorrect."; } $mailname=$1; @@ -37,7 +37,7 @@ my @todo=( foreach(@todo) { mkdir($_); - system("/bin/chown 33:$uid '$_'"); + chown(33, $uid, $_); } 0; diff --git a/src/mem_add b/src/mem_add index a57c2eae..9aa74d6e 100755 --- a/src/mem_add +++ b/src/mem_add @@ -28,7 +28,7 @@ $( = $); my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name; mkdir($PTH); -system("/bin/chown 33:$uid '$PTH'"); +chown(33, $uid, $PTH); system("/bin/chmod 02770 '$PTH'"); 0;