File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,9 @@ if ( $OPTS{'h'} || !$ARGV[0] ) {
171171# log directory
172172my $LOGDIR ;
173173if ( $ARGV [0] ) {
174- if ( !-d $ARGV [0] ) {
174+ if ( !-d $ARGV [0] || -l $ARGV [0] ) {
175175 print STDERR
176- " [vlogger] target directory $ARGV [0] does not exist - exiting.\n\n " ;
176+ " [vlogger] target directory $ARGV [0] does not exist or is a symlink - exiting.\n\n " ;
177177 exit ;
178178 }
179179 $LOGDIR = $ARGV [0];
@@ -429,6 +429,11 @@ else {
429429 unless ( -d " ${vhost} " ) {
430430 mkdir (" ${vhost} " );
431431 }
432+
433+ # Dont log to symlinks
434+ if ( -l " ${vhost} /" .time2str( $TEMPLATE , time () ) ) {
435+ die (" Log target is a symlink: $LOGDIR /${vhost} /" .time2str( $TEMPLATE , time () ));
436+ }
432437
433438 # open the file using the template
434439 open $vhost , " >>${vhost} /" . time2str( $TEMPLATE , time () )
You can’t perform that action at this time.
0 commit comments