ports/82815: [maintainer update] fix net/gatekeeper config file handling
Joerg Pulz
Joerg.Pulz at frm2.tum.de
Thu Jun 30 12:00:31 UTC 2005
>Number: 82815
>Category: ports
>Synopsis: [maintainer update] fix net/gatekeeper config file handling
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 30 12:00:31 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Joerg Pulz
>Release: FreeBSD 5.4-RC1 i386
>Organization:
TU-Munich / ZWE FRM-II
>Environment:
System: FreeBSD hades.admin.frm2 5.4-RC1 FreeBSD 5.4-RC1 #4: Mon Apr 4 12:57:01 CEST 2005 root at hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386
>Description:
due to a small bug, gatekeeper is unable to open the configuration
file, regardless if the file is specified using "-c" or is placed
in one of the default configuration directories.
this makes net/gatekeeper unusable!
thanks to: Tyler Aviss <taviss at sd73.bc.ca> for pointing this out
>How-To-Repeat:
install net/gatekeeper and simply start it. there will be an error
like:
WARNING: No config file found!
- Does the config file exist? The default
(~/.pwlib_config/Gatekeeper.ini or gatekeeper.ini in
current directory) or the one given with -c?
- Did you specify they the right 'Main' section with -s?
- Is the line 'Fourtytwo=42' present in this 'Main' section?
>Fix:
- apply the patch to net/gatekeeper and add the newly created file
files/patch-Toolkit.cxx to CVS
- bump PORTREVISION
--- gatekeeper.diff begins here ---
Index: files/patch-Toolkit.cxx
===================================================================
RCS file: files/patch-Toolkit.cxx
diff -N files/patch-Toolkit.cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-Toolkit.cxx 30 Jun 2005 11:43:41 -0000
@@ -0,0 +1,31 @@
+--- Toolkit.cxx.orig Thu Jun 30 12:09:18 2005
++++ Toolkit.cxx Thu Jun 30 12:10:07 2005
+@@ -783,18 +783,19 @@
+ m_Config = new PConfig(m_ConfigFilePath, m_ConfigDefaultSection);
+ }
+
+- if (!m_extConfigFilePath)
++ if (!m_extConfigFilePath) {
+ PFile::Remove(m_extConfigFilePath);
+
+- // generate a unique name
+- do {
+- m_extConfigFilePath = tmpdir + PDIR_SEPARATOR + "gnugk.ini-" + PString(PString::Unsigned, rand()%10000);
+- PTRACE(5, "GK\tTrying file name "<< m_extConfigFilePath << " for external config");
+- } while (PFile::Exists(m_extConfigFilePath));
++ // generate a unique name
++ do {
++ m_extConfigFilePath = tmpdir + PDIR_SEPARATOR + "gnugk.ini-" + PString(PString::Unsigned, rand()%10000);
++ PTRACE(5, "GK\tTrying file name "<< m_extConfigFilePath << " for external config");
++ } while (PFile::Exists(m_extConfigFilePath));
+
+- m_Config = new GatekeeperConfig(
+- m_extConfigFilePath, m_ConfigDefaultSection, m_Config
+- );
++ m_Config = new GatekeeperConfig(
++ m_extConfigFilePath, m_ConfigDefaultSection, m_Config
++ );
++ }
+ }
+
+ void Toolkit::ReloadSQLConfig()
--- gatekeeper.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list