Code

bugfix: log file has permission 0600
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 May 2008 07:50:12 +0000 (07:50 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 May 2008 07:50:12 +0000 (07:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10995 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-client
gosa-si/gosa-si-server
gosa-si/gosa-si-server-nobus

index 1bd774cd2f0e4a825f04d2836e3cd4f85751677a..17dcdff3e906dd5b22aefd28eeb94f0bfd8dd302 100755 (executable)
@@ -244,7 +244,8 @@ sub daemon_log {
     if(not defined $msg) { return }
     if(not defined $level) { $level = 1 }
     if(defined $log_file){
-        open(LOG_HANDLE, ">>$log_file", 0600);
+        open(LOG_HANDLE, ">>$log_file");
+        chmod 0600, $log_file;
         if(not defined open( LOG_HANDLE, ">>$log_file" )) {
             print STDERR "cannot open $log_file: $!";
             return }
index 90c628240a2c64276b61e799969b6a398633bd1e..289244446dab5dd05de9fc2cf68b1007db3b7c6f 100755 (executable)
@@ -288,7 +288,8 @@ sub daemon_log {
     if(not defined $msg) { return }
     if(not defined $level) { $level = 1 }
     if(defined $log_file){
-        open(LOG_HANDLE, ">>$log_file", 0600);
+        open(LOG_HANDLE, ">>$log_file");
+        chmod 0600, $log_file;
         if(not defined open( LOG_HANDLE, ">>$log_file" )) {
             print STDERR "cannot open $log_file: $!";
             return }
index 4a3c2fa411c15b4dbd1ae78b2bd18d2aa630e3d0..db8d4447db3d21b4874a9d95c1859a477445b889 100755 (executable)
@@ -314,7 +314,8 @@ sub daemon_log {
     if(not defined $msg) { return }
     if(not defined $level) { $level = 1 }
     if(defined $log_file){
-        open(LOG_HANDLE, ">>$log_file", 0600);
+        open(LOG_HANDLE, ">>$log_file");
+        chmod 0600, $log_file;
         if(not defined open( LOG_HANDLE, ">>$log_file" )) {
             print STDERR "cannot open $log_file: $!";
             return }