summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e97583b)
raw | patch | inline | side by side (parent: e97583b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 3 Apr 2007 09:26:50 +0000 (09:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 3 Apr 2007 09:26:50 +0000 (09:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5958 594d385d-05f5-0310-b6e9-bd551577e9d8
setup/class_setupStep8.inc | patch | blob | history |
index ac59df5b8e5c69b702ddc462693dc0de3763b55b..8a296489f5c55e29de9b03e9c06b6fdea9f459ae 100644 (file)
function execute()
{
+ $info= posix_getgrgid(posix_getgid());
+ $webgroup = $info['name'];
+
/* Check if there is currently an active gosa.conf
*/
if(!fwrite($fp,strlen($data))){
$err_msg = sprintf(_("Can not write file '%s'. Please check folder permission and try again. Or use the manual method if this can not be fixed anyway."),CONFIG_DIR.$this->gosa_conf_name);
$abort =TRUE;
+ }else{
+
+ @chgrp(CONFIG_DIR.$this->gosa_conf_name,$webgroup);
+ @chown(CONFIG_DIR.$this->gosa_conf_name,"root");
+ @chmod(CONFIG_DIR.$this->gosa_conf_name,0640);
}
}
}
if($exists && $this->is_world_readable(CONFIG_DIR.$this->gosa_conf_name)){
- $err_msg = _("Your configuration file is currently world readable. This is a big security issue. Please updated the file permissions as shown in the manual configuration part below.");
+ $err_msg = _("Your configuration file is currently world readable. This is a big security risk. Please updated the file permissions as shown in the manual configuration part below.");
}
- $info= posix_getgrgid(posix_getgid());
$smarty = get_smarty();
$smarty->assign("save_requested", isset($_POST['saveconf']));
$smarty->assign("err_msg",$err_msg);
- $smarty->assign("webgroup", $info['name']);
+ $smarty->assign("webgroup", $webgroup);
$smarty->assign("gosa_conf_name" , $this->gosa_conf_name);
$smarty->assign("create_backup" , $this->create_backup);
$smarty->assign("CONFIG_DIR",CONFIG_DIR);
*/
function create_backup()
{
+ $info= posix_getgrgid(posix_getgid());
+ $webgroup = $info['name'];
if(is_writeable(CONFIG_DIR) && is_writeable(CONFIG_DIR.$this->gosa_conf_name)){
$src = CONFIG_DIR.$this->gosa_conf_name;
$dst = CONFIG_DIR.$this->gosa_conf_name."_".date("Ymd");
$dst = $dst_backup."-".$i;
$i ++;
}
-# if(rename($src,$dst)){
if(copy($src,$dst)){
$this->last_backup_name = $dst;
+ @chgrp($dst,$webgroup);
+ @chown($dst,"root");
+ @chmod($dst,0640);
return(TRUE);
}else{
return(FALSE);