Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 343 → Rev 344

/alcasar.sh
551,7 → 551,7
AuthUserFile $DIR_ACC/digest/key_admin
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_ACC/manager/htdocs>
<Directory $DIR_ACC/manager>
SSLRequireSSL
AllowOverride None
Order deny,allow
565,20 → 565,6
AuthUserFile $DIR_ACC/digest/key_manager
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_ACC/manager/html>
SSLRequireSSL
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from $PRIVATE_NETWORK_MASK
require valid-user
AuthType digest
AuthName $HOSTNAME
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
AuthUserFile $DIR_ACC/digest/key_manager
ErrorDocument 404 https://$PRIVATE_IP/
</Directory>
<Directory $DIR_ACC/backup>
SSLRequireSSL
AllowOverride None
732,12 → 718,12
{
# copie de l'interface d'origine dans la structure Alcasar
[ -d /usr/share/freeradius-web ] && cp -rf /usr/share/freeradius-web/* $DIR_ACC/manager/
# copie des fichiers modifiés et suppression des fichiers inutiles
cp -rf $DIR_INSTALL/web/acc/manager/* $DIR_ACC/manager/
rm -f $DIR_ACC/manager/index.html $DIR_ACC/manager/readme
rm -f $DIR_ACC/manager/htdocs/about.html $DIR_ACC/manager/htdocs/index.html $DIR_ACC/manager/htdocs/content.html
# copie des fichiers modifiés
cp -rf $DIR_INSTALL/web/acc/manager/* $DIR_ACC/manager/
chown -R apache:apache $DIR_ACC/manager/
# Modification du fichier de configuration
# Modification des fichiers de configuration
[ -e /etc/freeradius-web/admin.conf.default ] || cp /etc/freeradius-web/admin.conf /etc/freeradius-web/admin.conf.default
$SED "s?^general_domain:.*?general_domain: $ORGANISME.$DOMAIN?g" /etc/freeradius-web/admin.conf
$SED "s?^sql_username:.*?sql_username: $DB_USER?g" /etc/freeradius-web/admin.conf
747,6 → 733,8
$SED "s?^sql_password_attribute:.*?sql_password_attribute: Crypt-Password?g" /etc/freeradius-web/admin.conf
$SED "s?^general_finger_type.*?# general_finger_type: snmp?g" /etc/freeradius-web/admin.conf
$SED "s?^general_stats_use_totacct.*?general_stats_use_totacct: yes?g" /etc/freeradius-web/admin.conf
[ -e /etc/freeradius-web/config.php.default ] || cp /etc/freeradius-web/config.php /etc/freeradius-web/config.php.default
cp -f $DIR_CONF/freeradiusweb-config.php /etc/freeradius-web/config.php
cat <<EOF > /etc/freeradius-web/naslist.conf
nas1_name: alcasar.%{general_domain}
nas1_model: Portail captif
767,8 → 755,7
chown -R apache:apache /etc/freeradius-web
# Ajout de l'alias vers la page de "changement de mot de passe usager"
cat <<EOF >> /etc/httpd/conf/webapps.d/alcasar.conf
Alias /pass/ "$DIR_ACC/manager/pass/"
<Directory $DIR_ACC/manager/pass>
<Directory $DIR_WEB/pass>
SSLRequireSSL
AllowOverride None
Order deny,allow
1009,7 → 996,8
$SED "s?^SiteDomain=.*?SiteDomain=\"$HOSTNAME\"?g" /etc/awstats/awstats.conf
$SED "s?^HostAliases=.*?HostAliases=\"$PRIVATE_IP\"?g" /etc/awstats/awstats.conf
$SED "s?^DNSLookup=.*?DNSLookup=0?g" /etc/awstats/awstats.conf
$SED "s?^DirData=.*?DirData=\"/var/lib/awstats\"?g" /etc/awstats/awstats.conf # corrige le fichier de config awstats natif ...
$SED "s?^DirData=.*?DirData=\"/var/lib/awstats\"?g" /etc/awstats/awstats.conf
$SED "s?^DirIcons=.*?DirIcons=\"/acc/awstats/icon\"?g" /etc/awstats/awstats.conf
$SED "s?^StyleSheet=.*?StyleSheet=\"/css/style.css\"?g" /etc/awstats/awstats.conf
$SED "s?^BuildReportFormat=.*?BuildReportFormat=xhtml?g" /etc/awstats/awstats.conf
$SED "s?^UseFramesWhenCGI=.*?UseFramesWhenCGI=0?g" /etc/awstats/awstats.conf
1377,7 → 1365,7
 
do
$func
# echo "*** 'debug' : end of function $func ***"; read a
echo "*** 'debug' : end of function $func ***"; read a
done
;;
-u | --uninstall)
/conf/freeradiusweb-config.php
0,0 → 1,115
<?php
#
# Things should work even if register_globals is set to off
#
$testVer=intval(str_replace(".", "",'4.1.0'));
$curVer=intval(str_replace(".", "",phpversion()));
if( $curVer >= $testVer )
import_request_variables('GPC');
# If using sessions set use_session to 1 to also cache the config file
#
$use_session = 0;
unset($config);
unset($nas_list);
if ($use_session){
// Start session
@session_start();
if (isset($_SESSION['config']))
$config = $_SESSION['config'];
if (isset($_SESSION['nas_list']))
$nas_list = $_SESSION['nas_list'];
}
if (!isset($config)){
$ARR=file("/etc/freeradius-web/admin.conf");
$EXTRA_ARR = array();
foreach($ARR as $val) {
$val=chop($val);
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
continue;
list($key,$v)=split(":[[:space:]]*",$val,2);
if (preg_match("/%\{(.+)\}/",$v,$matches)){
$val=$config[$matches[1]];
$v=preg_replace("/%\{$matches[1]\}/",$val,$v);
}
if (preg_match("/^nas(\d+)_(\w+)$/",$key,$matches))
$nas_list[$matches[1]][$matches[2]] = $v;
if ($key == 'INCLUDE'){
if (is_readable($v))
array_push($EXTRA_ARR,file($v));
else
echo "<b>Error: File '$v' does not exist or is not readable</b><br>\n";
}
else
$config["$key"]="$v";
}
foreach($EXTRA_ARR as $val1) {
foreach($val1 as $val){
$val=chop($val);
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
continue;
list($key,$v)=split(":[[:space:]]*",$val,2);
if (preg_match("/%\{(.+)\}/",$v,$matches)){
$val=$config[$matches[1]];
$v=preg_replace("/%\{$matches[1]\}/",$val,$v);
}
if (preg_match("/^nas(\d+)_(\w+)$/",$key,$matches))
$nas_list[$matches[1]][$matches[2]] = $v;
$config["$key"]="$v";
}
}
if ($use_session){
session_register('config');
session_register('nas_list');
}
 
}
if ($use_session == 0 && $config['general_use_session'] == 'yes'){
// Start session
@session_start();
if (isset($nas_list))
session_register('nas_list');
}
//Make sure we are only passed allowed strings in username
if (isset($login)){
if ($login != '')
$login = preg_replace("/[^\w\.\/\@\:\-]/",'',$login);
if ($login != '' && $config['general_strip_realms'] == 'yes'){
$realm_del = ($config['general_realm_delimiter'] != '') ? $config['general_realm_delimiter'] : '@';
$realm_for = ($config['general_realm_format'] != '') ? $config['general_realm_format'] : 'suffix';
$new = explode($realm_del,$login,2);
if (count($new) == 2)
$login = ($realm_for == 'suffix') ? $new[0] : $new[1];
}
}
unset($mappings);
if (isset($_SESSION['mappings']))
$mappings = $_SESSION['mappings'];
if (!isset($mappings) && $config['general_username_mappings_file'] != ''){
$ARR = file($config['general_username_mappings_file']);
foreach($ARR as $val){
$val=chop($val);
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
continue;
list($key,$realm,$v)=split(":[[:space:]]*",$val,3);
if ($realm == 'accounting' || $realm == 'userdb' || $realm == 'nasdb' || $realm == 'nasadmin')
$mappings["$key"][$realm] = $v;
if ($realm == 'nasdb'){
$NAS_ARR = array();
$NAS_ARR = split(',',$v);
foreach ($nas_list as $key => $nas){
foreach ($NAS_ARR as $nas_check){
if ($nas_check == $nas['name'])
unset($nas_list[$key]);
}
}
}
}
if ($config['general_use_session'] == 'yes')
session_register('mappings');
}
 
//Include missing.php if needed
if (!function_exists('array_change_key_case'))
include_once('../lib/missing.php');
@header('Content-type: text/html; charset='.$config['general_charset'].';');
?>
/web/images/alcasar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Deleted: svn:mime-type
-image/png
\ No newline at end of property
/web/images/titre-alcasar-2.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/images/titre-alcasar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/images/titre-alcasar-3.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/acc/haut.php
16,7 → 16,7
</HEAD>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TD valign="top" align="left"><A HREF=javascript:ouvrir("about.htm")><IMG height="80" border="0" SRC="/images/logo-alcasar.png"f></A></TD>
<TD valign="top" align="center"><A HREF="http://www.alcasar.info" TARGET="_new"><IMG height="80" border="0" SRC="/images/alcasar.png"></A></TD>
<TD valign="top" align="center"><A HREF="http://www.alcasar.info" TARGET="_new"><IMG height="80" border="0" SRC="/images/titre-alcasar.png"></A></TD>
<TD valign="top" align="right"><A HREF="admin/logo.php" TARGET="REXY2"><IMG height="80" border="0" SRC="/images/organisme.png"></A></TD>
</TABLE>
</BODY>
/web/acc/admin/ldap.php
34,14 → 34,14
 
$message = "";
if ((bool)$erreur){
$message = "<div align=\"center\"><br />";
$message.="<strong><font color=\"red\">".$erreur."</font></strong><br />";
$message.="<br /></div>";
$message = "<div align=\"center\"><br>";
$message.="<strong><font color=\"red\">".$erreur."</font></strong><br>";
$message.="<br></div>";
}else{
if ($update){
$message = "<div align=\"center\"><br />";
$message.="<strong><font color=\"red\">Mise à jour des paramètres ldap réalisé avec succès</font><br /></strong>";
$message.="<br /></div>";
$message = "<div align=\"center\"><br>";
$message.="<strong><font color=\"red\">Mise à jour des paramètres ldap réalisé avec succès</font><br></strong>";
$message.="<br></div>";
}
}
 
214,10 → 214,10
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><!-- written by steweb57 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $l_ldap_title; ?></title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="../css/ldap.css" type="text/css">
<link rel="stylesheet" href="/css/ldap.css" type="text/css">
<script language="javascript">
function testLdapActif(){
//List des ID des éléments à désactiver
268,66 → 268,66
<dl>
<dt>
<label for="ldap_server"><?php echo $l_ldap_server_label; ?></label>
<br />
<br>
<?php echo $l_ldap_server_text; ?></dt>
<dd>
<input id="ldap_server" size="40" name="ldap_server" value="<?php echo htmlspecialchars($ldap_server); ?>"/>
<input id="ldap_server" size="40" name="ldap_server" value="<?php echo htmlspecialchars($ldap_server); ?>">
</dd>
</dl>
<dl>
<dt>
<label for="ldap_dn"><?php echo $l_ldap_base_dn_label; ?></label>
<br />
<br>
<?php echo $l_ldap_base_dn_text; ?></dt>
<dd>
<input id="ldap_dn" size="40" name="ldap_base_dn" value="<?php echo htmlspecialchars($ldap_basedn); ?>" />
<input id="ldap_dn" size="40" name="ldap_base_dn" value="<?php echo htmlspecialchars($ldap_basedn); ?>">
</dd>
</dl>
<dl>
<dt>
<label for="ldap_filter"><?php echo $l_ldap_filter_label; ?></label>
<br />
<br>
<?php echo $l_ldap_filter_text; ?></dt>
<dd>
<input id="ldap_filter" size="40" name="ldap_filter" value="<?php echo htmlspecialchars($ldap_filter); ?>" />
<input id="ldap_filter" size="40" name="ldap_filter" value="<?php echo htmlspecialchars($ldap_filter); ?>">
</dd>
</dl>
<dl>
<dt>
<label for="ldap_base_filter"><?php echo $l_ldap_base_filter_label; ?></label>
<br />
<br>
<?php echo $l_ldap_base_filter_text; ?></dt>
<dd>
<input id="ldap_base_filter" size="40" name="ldap_base_filter" value="<?php echo htmlspecialchars($ldap_base_filter); ?>" />
<input id="ldap_base_filter" size="40" name="ldap_base_filter" value="<?php echo htmlspecialchars($ldap_base_filter); ?>">
</dd>
</dl>
<dl>
<dt>
<label for="ldap_user"><?php echo $l_ldap_user_label; ?></label>
<br />
<br>
<?php echo $l_ldap_user_text; ?></dt>
<dd>
<input id="ldap_user" size="40" name="ldap_user" value="<?php echo htmlspecialchars($ldap_identity); ?>" />
<input id="ldap_user" size="40" name="ldap_user" value="<?php echo htmlspecialchars($ldap_identity); ?>">
</dd>
</dl>
<dl>
<dt>
<label for="ldap_password"><?php echo $l_ldap_password_label; ?></label>
<br />
<br>
<?php echo $l_ldap_password_text; ?></dt>
<dd>
<input id="ldap_password" type="password" size="40" name="ldap_password" value="<?php echo htmlspecialchars($ldap_password);?>" />
<input id="ldap_password" type="password" size="40" name="ldap_password" value="<?php echo htmlspecialchars($ldap_password);?>">
</dd>
</dl>
<p>
<input id="submit" type="submit" value="<?php echo $l_ldap_submit; ?>" name="submit" />
<input id="submit" type="submit" value="<?php echo $l_ldap_submit; ?>" name="submit">
 
<input id="reset" type="reset" value="<?php echo $l_ldap_reset; ?>" name="reset" />
<input id="reset" type="reset" value="<?php echo $l_ldap_reset; ?>" name="reset">
</p>
 
</fieldset>
</form>
<br />
<br>
</td></tr>
</table>
</body>
/web/acc/manager/pass/index.php
File deleted