From c092a6153eaca145ccdfb29697d937c337d9e03f Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Thu, 21 Mar 2013 02:10:34 +0100 Subject: [PATCH] make debug files pathnames more FHS compliant * Changed the pathnames of the debug files to be a bit more FHS compliant. --- ChangeLog | 4 ++++ inc/CalDAVRequest.php | 2 +- inc/caldav-ACL.php | 2 +- inc/caldav-MOVE.php | 2 +- inc/caldav-POST.php | 2 +- inc/caldav-PUT-default.php | 2 +- inc/caldav-PUT-functions.php | 2 +- inc/caldav-PUT-vcalendar.php | 2 +- inc/caldav-PUT-vcard.php | 2 +- inc/caldav-REPORT.php | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ac3a61b..c8fd4113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-03-21 Christoph Anton Mitterer + * Changed the pathnames of the debug files to be a bit more FHS + compliant. + 2013-03-20 Christoph Anton Mitterer * Changed the end-of-line encodings of all non-Windows-related and non-autogenerated text files to use UNIX LF (lots of them had mixed diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index d6003a6a..864eafb6 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -183,7 +183,7 @@ class CalDAVRequest @dbg_error_log('caldav', 'Content-Encoding: %s', $encoding ); $encoding = preg_replace('{[^a-z0-9-]}i','',$encoding); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || isset($c->dbg['caldav'])) ) { - $fh = fopen('/tmp/encoded_data.'.$encoding,'w'); + $fh = fopen('/var/log/davical/encoded_data.debug'.$encoding,'w'); if ( $fh ) { fwrite($fh,$c->raw_post); fclose($fh); diff --git a/inc/caldav-ACL.php b/inc/caldav-ACL.php index 06cc40e8..6e6f539c 100644 --- a/inc/caldav-ACL.php +++ b/inc/caldav-ACL.php @@ -15,7 +15,7 @@ require_once('DAVResource.php'); $request->NeedPrivilege('DAV::write-acl'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['put']) && $c->dbg['put'])) ) { - $fh = fopen('/tmp/MOVE.txt','w'); + $fh = fopen('/var/log/davical/MOVE.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-MOVE.php b/inc/caldav-MOVE.php index ad0e120e..a9e742eb 100644 --- a/inc/caldav-MOVE.php +++ b/inc/caldav-MOVE.php @@ -15,7 +15,7 @@ require_once('DAVResource.php'); $request->NeedPrivilege('DAV::unbind'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['move']) && $c->dbg['move'])) ) { - $fh = fopen('/tmp/MOVE.txt','w'); + $fh = fopen('/var/log/davical/MOVE.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-POST.php b/inc/caldav-POST.php index 26629a63..8f990f9b 100644 --- a/inc/caldav-POST.php +++ b/inc/caldav-POST.php @@ -16,7 +16,7 @@ include_once('freebusy-functions.php'); include_once('iSchedule.php'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || isset($c->dbg['post'])) ) { - $fh = fopen('/tmp/POST.txt','w'); + $fh = fopen('/var/log/davical/POST.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-PUT-default.php b/inc/caldav-PUT-default.php index 64b1a752..d291acb3 100644 --- a/inc/caldav-PUT-default.php +++ b/inc/caldav-PUT-default.php @@ -13,7 +13,7 @@ dbg_error_log("PUT", "method handler"); require_once('DAVResource.php'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['put']) && $c->dbg['put'])) ) { - $fh = fopen('/tmp/PUT.txt','w'); + $fh = fopen('/var/log/davical/PUT.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index f94d7950..09f7c5c4 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -647,7 +647,7 @@ function import_collection( $import_content, $user_no, $path, $caldav_context, $ global $c; if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || isset($c->dbg['put'])) ) { - $fh = fopen('/tmp/PUT-2.txt','w'); + $fh = fopen('/var/log/davical/PUT-2.debug','w'); if ( $fh ) { fwrite($fh,$import_content); fclose($fh); diff --git a/inc/caldav-PUT-vcalendar.php b/inc/caldav-PUT-vcalendar.php index 1d130531..65251ab7 100644 --- a/inc/caldav-PUT-vcalendar.php +++ b/inc/caldav-PUT-vcalendar.php @@ -45,7 +45,7 @@ if ( ! $dav_resource->Exists() && ! $dav_resource->HavePrivilegeTo('DAV::bind') } if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['put']) && $c->dbg['put'])) ) { - $fh = fopen('/tmp/PUT.txt','w'); + $fh = fopen('/var/log/davical/PUT.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-PUT-vcard.php b/inc/caldav-PUT-vcard.php index 0ced7ec3..8bb7dafe 100644 --- a/inc/caldav-PUT-vcard.php +++ b/inc/caldav-PUT-vcard.php @@ -13,7 +13,7 @@ dbg_error_log("PUT", "method handler"); require_once('DAVResource.php'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['put']) && $c->dbg['put'])) ) { - $fh = fopen('/tmp/PUT.txt','w'); + $fh = fopen('/var/log/davical/PUT.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh); diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index 8d0e4355..8568e7f5 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -16,7 +16,7 @@ require_once('DAVResource.php'); require_once('RRule-v2.php'); if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['report']) && $c->dbg['report'])) ) { - $fh = fopen('/tmp/REPORT.txt','w'); + $fh = fopen('/var/log/davical/REPORT.debug','w'); if ( $fh ) { fwrite($fh,$request->raw_post); fclose($fh);