From 41073d77091f980f49ef574f2ac9bffa2b7a566e Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 11 Sep 2008 15:00:11 +0000 Subject: [PATCH] update: log file is set to root:adm 640 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12434 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 7 +++++++ gosa-si/gosa-si-server | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 2e5a36166..1b6fa0ceb 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1038,6 +1038,13 @@ if ($client_headURL =~ /\/tag\// || $client_status = "developmental" ; } +# Prepare log file +my $root_uid = getpwnam('root'); +my $adm_gid = getgrnam('adm'); +chmod(0640, $log_file); +chown($root_uid, $adm_gid, $log_file); + + daemon_log(" ", 1); daemon_log("$prg started!", 1); daemon_log("INFO: status: $client_status", 1); diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 3936bbf50..08df17437 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -314,7 +314,6 @@ sub daemon_log { if(not defined $level) { $level = 1 } if(defined $log_file){ open(LOG_HANDLE, ">>$log_file"); - chmod 0640, $log_file; if(not defined open( LOG_HANDLE, ">>$log_file" )) { print STDERR "cannot open $log_file: $!"; return @@ -3137,6 +3136,12 @@ if ($server_headURL =~ /\/tag\// || $server_status = "developmental" ; } +# Prepare log file +my $root_uid = getpwnam('root'); +my $adm_gid = getgrnam('adm'); +chmod(0640, $log_file); +chown($root_uid, $adm_gid, $log_file); + daemon_log(" ", 1); daemon_log("$0 started!", 1); -- 2.30.2