little bug(?) in nnrpd.c

Sven Paulus sven at karlsruhe.org
Mon Aug 14 18:07:55 UTC 2000



On 15.08., Katsuhiro Kondou wrote:
> } While reading through the 2.3 nnrpd code, I think the ':' after 't' in
> } nnrpd/nnrpd.c:main() in the HAVE_SSL-case is wrong:
> Fixed.  Thanks.

Thanx. What I just saw is that _PATH_RADIUS_CONFIG and _PATH_SASL_CONFIG are
hardcoded in include/paths.h.in instead of assembled dynamically.

How about something like this:

--- sasl_config.c~	Sun Aug  6 07:29:59 2000
+++ sasl_config.c	Mon Aug 14 20:03:30 2000
@@ -93,8 +93,11 @@
     int alloced = 0;
     char buf[4096];
     char *p, *key;
-
-    infile = fopen(_PATH_SASL_CONFIG, "r");
+    static char *SASL_CONFIG = NULL;
+    
+    if (!SASL_CONFIG)
+	SASL_CONFIG = COPY(cpcatpath(innconf->pathetc, _PATH_SASL_CONFIG));
+    infile = fopen(SASL_CONFIG, "r");
     if (!infile) {
       fprintf(stderr, "can't open configuration file %s\n", _PATH_SASL_CONFIG);
       exit(1);

and dropping "@ETCDIR@/" in include/paths.h.in?

Sven




More information about the inn-bugs mailing list