From f54bfb656ad4c5951a0258173527935dd24d8856 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Mon, 17 Jul 2023 11:08:14 -0700 Subject: [PATCH] Fix hard-coded dir for 'banned_names.conf'. --- Rocksolid_Light/rocksolid/config.inc.php | 1 + Rocksolid_Light/rslight/scripts/spoolnews.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 Rocksolid_Light/rslight/scripts/spoolnews.php diff --git a/Rocksolid_Light/rocksolid/config.inc.php b/Rocksolid_Light/rocksolid/config.inc.php index 80e6cbe..926a826 100644 --- a/Rocksolid_Light/rocksolid/config.inc.php +++ b/Rocksolid_Light/rocksolid/config.inc.php @@ -29,6 +29,7 @@ $CONFIG = include($config_file); $logdir=$spooldir.'/log'; $lockdir=$spooldir.'/lock'; $ssldir=$spooldir.'/ssl/'; +$user_ban_file=$config_dir.'/banned_names.conf'; /* Permanent configuration changes */ @mkdir($logdir,0755,'recursive'); diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php old mode 100755 new mode 100644 index 36020ac..04c224e --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -131,7 +131,7 @@ unlink($lockfile); echo "\nSpoolnews Done\n"; function get_articles($ns, $group) { - global $enable_rslight, $spooldir, $CONFIG, $maxarticles_per_run, $maxfirstrequest, $workpath, $path, $remote_groupfile, $local_groupfile, $local, $logdir, $config_name, $logfile; + global $enable_rslight, $spooldir, $CONFIG, $user_ban_file, $maxarticles_per_run, $maxfirstrequest, $workpath, $path, $remote_groupfile, $local_groupfile, $local, $logdir, $config_name, $logfile; if($ns == false) { file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Lost connection to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND); @@ -139,7 +139,7 @@ function get_articles($ns, $group) { } $grouppath = $path.preg_replace('/\./', '/', $group); - $banned_names = file("/etc/rslight/banned_names.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $banned_names = file($user_ban_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $nocem_check="@@NCM";