Ajoute la variable blowfish dans le fichier de config de PhpMyAdmin
This commit is contained in:
parent
4c78bd8126
commit
0ff730b603
|
@ -455,10 +455,10 @@ etc/alternc/alternc.ini -text
|
|||
etc/alternc/apache2-ssl.conf -text
|
||||
etc/alternc/dbusers.cnf.sample -text
|
||||
etc/alternc/functions_hosting/hosting_massvhost.sh -text
|
||||
etc/alternc/phpmyadmin.inc.php -text
|
||||
etc/alternc/templates/alternc/apache2.conf -text
|
||||
etc/alternc/templates/alternc/apache_logformat.conf -text
|
||||
etc/alternc/templates/alternc/bureau.conf -text
|
||||
etc/alternc/templates/alternc/phpmyadmin.inc.php -text
|
||||
etc/alternc/templates/alternc/postfix/postfix-slave.cf -text
|
||||
etc/alternc/templates/alternc/postfix/postfix.cf -text
|
||||
etc/alternc/templates/apache2/envvars -text
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
# AUTO GENERATED FILE
|
||||
# Modify template in /etc/alternc/templates/
|
||||
# and launch alternc.install if you want
|
||||
# to modify this file.
|
||||
|
||||
/**
|
||||
* Special phpmyadmin configuration for AlternC
|
||||
*
|
||||
|
@ -19,6 +24,7 @@ $cfg['SuhosinDisableWarning'] = true;
|
|||
$cfg['ShowCreateDb'] = false;
|
||||
$cfg['ShowChgPassword'] = false;
|
||||
$cfg['LoginCookieRecall'] = false;
|
||||
$cfg['blowfish_secret'] = '%%PHPMYADMIN_BLOWFISH%%';
|
||||
|
||||
$i = 1;
|
||||
|
|
@ -64,7 +64,7 @@ TEMPLATE_DIR="/etc/alternc/templates"
|
|||
|
||||
# Find needed configuration files (without the initial '/')
|
||||
# replace this one unconditionnally
|
||||
CONFIG_FILES="etc/alternc/bureau.conf etc/incron.d/alternc etc/apache2/envvars etc/alternc/apache2.conf etc/alternc/apache_logformat.conf"
|
||||
CONFIG_FILES="etc/alternc/bureau.conf etc/incron.d/alternc etc/apache2/envvars etc/alternc/apache2.conf etc/alternc/apache_logformat.conf etc/alternc/phpmyadmin.inc.php"
|
||||
|
||||
if [ -e /etc/bind/named.conf ]; then
|
||||
CONFIG_FILES="$CONFIG_FILES etc/bind/templates/zone.template
|
||||
|
@ -191,6 +191,9 @@ fi
|
|||
|
||||
PUBLIC_IP_BEGIN=$(echo $PUBLIC_IP|cut -c 1)
|
||||
|
||||
# Secret for PhpMyAdmin sessions
|
||||
PHPMYADMIN_BLOWFISH="$(generate_string 24)"
|
||||
|
||||
# XXX: I assume this is secure if /tmp is sticky (+t)
|
||||
# we should have a better way to deal with templating, of course.
|
||||
SED_SCRIPT="/tmp/alternc.install.sedscript"
|
||||
|
@ -217,6 +220,7 @@ s\\%%ns2_ip%%\\$NS2_IP\\;
|
|||
s\\%%ALTERNC_HTML%%\\$ALTERNC_HTML\\;
|
||||
s\\%%ALTERNC_MAIL%%\\$ALTERNC_MAIL\\;
|
||||
s\\%%ALTERNC_LOGS%%\\$ALTERNC_LOGS\\;
|
||||
s\\%%PHPMYADMIN_BLOWFISH%%\\$PHPMYADMIN_BLOWFISH\\;
|
||||
EOF
|
||||
|
||||
# hook
|
||||
|
|
|
@ -90,3 +90,12 @@ log_error() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
generate_string() {
|
||||
local size=$1
|
||||
if [ -z "$size" ] ; then
|
||||
size=20
|
||||
fi
|
||||
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-$size}
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue