From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 22 Apr 2016 05:26:17 -0400
Subject: [PATCH] Added PHP 7 check in installer and updater.

---
 server/scripts/vlogger |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/server/scripts/vlogger b/server/scripts/vlogger
index 858617d..5bc50f3 100755
--- a/server/scripts/vlogger
+++ b/server/scripts/vlogger
@@ -171,9 +171,9 @@
 # log directory
 my $LOGDIR;
 if ( $ARGV[0] ) {
-    if ( !-d $ARGV[0] ) {
+    if ( !-d $ARGV[0] || -l $ARGV[0]) {
         print STDERR
-          "[vlogger] target directory $ARGV[0] does not exist - exiting.\n\n";
+          "[vlogger] target directory $ARGV[0] does not exist or is a symlink - exiting.\n\n";
         exit;
     }
     $LOGDIR = $ARGV[0];
@@ -429,6 +429,11 @@
             unless ( -d "${vhost}" ) {
                 mkdir("${vhost}");
             }
+			
+			# Dont log to symlinks
+			if( -l "${vhost}/".time2str( $TEMPLATE, time() ) ) {
+				die("Log target is a symlink: $LOGDIR/${vhost}/".time2str( $TEMPLATE, time() ));
+			}
 
             # open the file using the template
             open $vhost, ">>${vhost}/" . time2str( $TEMPLATE, time() )

--
Gitblit v1.9.1