Commit 4845fa07 authored by Carsten Schoene's avatar Carsten Schoene

- replace all chown/chgrp calls with $app->system calls

parent 3062be98
......@@ -219,17 +219,18 @@ class maildeliver_plugin {
file_put_contents($sieve_file_isp, $tpl->grab()) or $app->log("Unable to write sieve filter file", LOGLEVEL_WARN);
if ( is_file($sieve_file_isp) ) {
chown($sieve_file_isp,$mail_config['mailuser_name']);
chgrp($sieve_file_isp,$mail_config['mailuser_group']);
$app->system->chown($sieve_file_isp,$mail_config['mailuser_name'],false);
$app->system->chgrp($sieve_file_isp,$mail_config['mailuser_group'],false);
}
chdir($data["new"]["maildir"]);
//* create symlink to activate sieve script
symlink("sieve/ispconfig.sieve", ".sieve") or $app->log("Unable to create symlink to active sieve filter", LOGLEVEL_WARN);
if (is_link(".sieve")) {
lchown(".sieve",$mail_config['mailuser_name']);
lchgrp(".sieve",$mail_config['mailuser_group']);
$app->system->chown(".sieve",$mail_config['mailuser_name'],true);
$app->system->chgrp(".sieve",$mail_config['mailuser_group'],true);
}
exec('chown '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($sieve_file));
$app->system->chown($sieve_file,$mail_config['mailuser_name'],true);
$app->system->chgrp($sieve_file,$mail_config['mailuser_group'],true);
unset($tpl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment