From e30f56e023b1128d1e1f380ea4c23d28f03ac3ef Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Sun, 6 Mar 2011 20:43:51 +0000 Subject: [PATCH] Dash nous cause des problemes. Je force les scripts a utiliser bash quand il le faut --- bureau/admin/head.php | 2 +- bureau/class/lang_env.php | 2 +- bureau/class/m_mem.php | 2 +- etc/alternc/apache2.conf | 4 +++- src/fixperms.sh | 2 +- src/quota_edit.sh | 2 +- src/quota_get.sh | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bureau/admin/head.php b/bureau/admin/head.php index 8b697a3c..e581e4c3 100644 --- a/bureau/admin/head.php +++ b/bureau/admin/head.php @@ -44,7 +44,7 @@ if (!$charset) $charset="iso-8859-1";

"; __("Invited session. Clic here to return to your previous session."); diff --git a/bureau/class/lang_env.php b/bureau/class/lang_env.php index 27bb7cd8..1cd34d1f 100644 --- a/bureau/class/lang_env.php +++ b/bureau/class/lang_env.php @@ -29,7 +29,7 @@ if (!(isset($lang))) { // Use the browser first preferred language } -if (!$locales[$lang]) { // Requested language not found in locales +if (! isset($locales[$lang])) { // Requested language not found in locales // treat special cases such as en_AU or fr_BF : use the language only, not the country. $ll=substr($lang,0,2); foreach($locales as $l) { diff --git a/bureau/class/m_mem.php b/bureau/class/m_mem.php index 5518ca48..946dda73 100644 --- a/bureau/class/m_mem.php +++ b/bureau/class/m_mem.php @@ -248,7 +248,7 @@ class m_mem { function del_session() { global $db,$user,$err,$cuid,$classes; $err->log("mem","del_session"); - $_COOKIE["session"]=addslashes($_COOKIE["session"]); + $_COOKIE["session"]=addslashes(isset($_COOKIE["session"])?$_COOKIE["session"]:''); setcookie("session","",0,"/"); setcookie("oldid","",0,"/admin/"); if ($_COOKIE["session"]=="") { diff --git a/etc/alternc/apache2.conf b/etc/alternc/apache2.conf index 71b40f57..dba54c43 100644 --- a/etc/alternc/apache2.conf +++ b/etc/alternc/apache2.conf @@ -14,6 +14,8 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/ Options FollowSymLinks AllowOverride None + Order allow, deny + Deny from all @@ -24,7 +26,7 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/ php_admin_flag safe_mode off php_admin_flag register_globals on AddDefaultCharset ISO-8859-1 - php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/ + php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen diff --git a/src/fixperms.sh b/src/fixperms.sh index 4110f9ae..7d0a70bf 100755 --- a/src/fixperms.sh +++ b/src/fixperms.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # # $Id: fixperms.sh,v 1.1 2005/08/29 19:21:31 benjamin Exp $ diff --git a/src/quota_edit.sh b/src/quota_edit.sh index ac94f625..efcd42c8 100755 --- a/src/quota_edit.sh +++ b/src/quota_edit.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . /etc/alternc/local.sh DATA_PART=`/bin/df ${ALTERNC_LOC} 2>/dev/null | /usr/bin/awk '/^\// { print $1 }'` /usr/sbin/setquota -r -g $1 $2 $2 0 0 $DATA_PART 2>/dev/null || echo "Group quota are not enabled on /var/alternc." >&2 diff --git a/src/quota_get.sh b/src/quota_get.sh index 7c6b63a4..5f6f4040 100755 --- a/src/quota_get.sh +++ b/src/quota_get.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . /etc/alternc/local.sh AWK=/usr/bin/awk