clean_radacct, monthly_tot_stats and truncate_radacct.
http://bugs.debian.org/374053
Thanks to Rudy Godoy <rudy@kernel-panik.org> and Stephen
Gran <sgran@debian.org>.
+Ver 1.70.3:
+* Test for unset variable, rather than empty variable in clean_radacct,
+ monthly_tot_stats and truncate_radacct.
+
Ver 1.70.2:
* Fix redirects in dialup-admin pages on servers with register_globals
turned off.
die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
-$sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+$sql_password = (!$sql_password) ? '' : "-p$sql_password";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
$realm_del = '@' if ($realm_del eq '');
$realm_for = 'suffix' if ($realm_for eq '');
-$pass = ($sql_password ne '') ? "-p$sql_password" : '';
+$pass = (!$sql_password) ? '' : "-p$sql_password";
die "SQL server not defined\n" if ($sql_server eq '');
die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
-$sql_password = ($sql_password == '') ? '' : "-p$sql_password";
+$sql_password = (!$sql_password) ? '' : "-p$sql_password";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
if ($mday == 1){
die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
-$sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+$sql_password = (!$sql_password) ? '' : "-p$sql_password";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);