From 3b3341f6dd202ef91f71a500640b945f3be6e1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi?= Date: Thu, 4 Jan 2007 16:12:21 +0000 Subject: [PATCH] =?UTF-8?q?modification=20de=20l'appel=20systeme=20=C3=A0?= =?UTF-8?q?=20chown,=20en=20appel=20au=20chown=20builtin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mail_add | 4 ++-- src/mem_add | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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;