Bug 15654 - The traceon() function in routed does not create a logfile
The traceon() function in routed does not create a logfile
Product: Red Hat Linux
Classification: Retired
Component: routed (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Depends On:
  Show dependency treegraph
Reported: 2000-08-07 12:22 EDT by Dale Chayes
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-07 12:22:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dale Chayes 2000-08-07 12:22:09 EDT
'routed' uses a function called traceon() to log data to a log file. The
plausible place for the log file is /var/log/routed/some-log-file.  It
appears that the base name of the file is defined in

pathnames.h:#define _PATH_LOGDIR    "/var/log/routed/"

and the actual file name is created from an unflagged command line

However, the code in trace.c function traceon() is doing a  string compare
(strncmp) and failing to generate a useful file name so no log data is

I commented out the compare and scabbed  in a (very ugly) temporary fix as
I am a bit short of time these days (who's not?):

	 * Trace file requests could come from anywhere...
/* 	if (strncmp(file, logdir, strlen(logdir)) || strstr(file, "/../")) */
/*	{  */
/*		syslog(LOG_ERR, "Cannot log to %s: not under %s\n",  */
/*		       file, logdir); */
/*		return; */
/*	} */

/*	fd = open(file, O_WRONLY|O_APPEND|O_CREAT|O_EXCL|O_NDELAY, 0600); */

	fd = open("/var/log/routed/stuff.log",

and I get the routed messages in /var/log/routed/stuff.log.

I worked from the SRPM that came w/ the RH 6.2 distribution and applied the
fork and jdbf patches first....

Comment 1 Eido Inoue 2001-07-16 12:32:30 EDT
This appears to have been addressed in the 0.17 sources which are in the current

Note You need to log in before you can comment on or make changes to this bug.