* Added test in postinst if user and group exist. Christoph Lameter run
into trouble upgrading a RedHat system. * Fixed little mistake which prevented klogd from accepting a console log level of 8 to get <7> alias KERN_DEBUG displayed. * Linked against libc6 (Bug#11731) * Added SHELL=/bin/bash to rules as Herbert Xu suggested * Corrected syslog.conf(5) manpage * syslogd resets the ignore priority flag now. Thanks to Herbert Thielen. (Bug#12009) * Fixed bug that caused syslogd to write into wrong files under some race conditions. Thanks to Herbet Xu. (Bug#13506) * /var/log/auth.log will only be touch if needed (Bug#14329) * debian/conffiles is treated like a document (Bug#14521) * Added script for generic logfile detection and rotation and included that in cron scripts, included also its manpage (Bug#14610) * Modified restart messages in /etc/init.d/sysklogd (Bug#15840) * klogd will first try to load /boot/System.map-$ver, then /boot/System.map, then /System.map-$ver and after that /System.map * Modified ExpandKadds() because there were some problems accessing memory r/w. (Bug#15336)
This commit is contained in:
parent
67383f9931
commit
05c061eaa5
21
ksym.c
21
ksym.c
@ -107,8 +107,8 @@ static struct sym_table *sym_array = (struct sym_table *) 0;
|
|||||||
|
|
||||||
static char *system_maps[] =
|
static char *system_maps[] =
|
||||||
{
|
{
|
||||||
"/System.map",
|
|
||||||
"/boot/System.map",
|
"/boot/System.map",
|
||||||
|
"/System.map",
|
||||||
#if defined(TEST)
|
#if defined(TEST)
|
||||||
"./System.map",
|
"./System.map",
|
||||||
#endif
|
#endif
|
||||||
@ -313,18 +313,20 @@ static char * FindSymbolFile()
|
|||||||
if ( debugging )
|
if ( debugging )
|
||||||
fputs("Searching for symbol map.\n", stderr);
|
fputs("Searching for symbol map.\n", stderr);
|
||||||
|
|
||||||
for (mf = system_maps; *mf != (char *) 0; ++mf)
|
for (mf = system_maps; *mf != (char *) 0 && sym_file == (FILE *) 0; ++mf)
|
||||||
{
|
{
|
||||||
sprintf (symfile, "%s", *mf);
|
|
||||||
|
sprintf (symfile, "%s-%s", *mf, utsname.release);
|
||||||
if ( debugging )
|
if ( debugging )
|
||||||
fprintf(stderr, "Trying %s.\n", symfile);
|
fprintf(stderr, "Trying %s.\n", symfile);
|
||||||
if ( (sym_file = fopen(symfile, "r")) == (FILE *) 0 ) {
|
if ( (sym_file = fopen(symfile, "r")) == (FILE *) 0 ) {
|
||||||
sprintf (symfile, "%s-%s", *mf, utsname.release);
|
sprintf (symfile, "%s", *mf);
|
||||||
if ( debugging )
|
if ( debugging )
|
||||||
fprintf(stderr, "Trying %s.\n", symfile);
|
fprintf(stderr, "Trying %s.\n", symfile);
|
||||||
if ( (sym_file = fopen(symfile, "r")) == (FILE *) 0 )
|
if ( (sym_file = fopen(symfile, "r")) == (FILE *) 0 )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At this point a map file was successfully opened. We
|
* At this point a map file was successfully opened. We
|
||||||
@ -352,8 +354,7 @@ static char * FindSymbolFile()
|
|||||||
switch ( version )
|
switch ( version )
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
if ( debugging )
|
Syslog(LOG_ERR, "Symbol table has incorrect " \
|
||||||
fprintf(stderr, "Symbol table has incorrect " \
|
|
||||||
"version number.\n");
|
"version number.\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -375,7 +376,6 @@ static char * FindSymbolFile()
|
|||||||
return(symfile);
|
return(symfile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -653,6 +653,7 @@ extern char * ExpandKadds(line, el)
|
|||||||
*elp = el,
|
*elp = el,
|
||||||
*symbol;
|
*symbol;
|
||||||
|
|
||||||
|
char num[15];
|
||||||
auto int value;
|
auto int value;
|
||||||
|
|
||||||
auto struct symbol sym;
|
auto struct symbol sym;
|
||||||
@ -704,8 +705,9 @@ extern char * ExpandKadds(line, el)
|
|||||||
return(el);
|
return(el);
|
||||||
}
|
}
|
||||||
dlm = *kp;
|
dlm = *kp;
|
||||||
*kp = '\0';
|
strncpy(num,sl+1,kp-sl-1);
|
||||||
value = strtol(sl+1, (char **) 0, 16);
|
num[kp-sl-1] = '\0';
|
||||||
|
value = strtol(num, (char **) 0, 16);
|
||||||
if ( (symbol = LookupSymbol(value, &sym)) == (char *) 0 )
|
if ( (symbol = LookupSymbol(value, &sym)) == (char *) 0 )
|
||||||
symbol = sl;
|
symbol = sl;
|
||||||
|
|
||||||
@ -717,7 +719,6 @@ extern char * ExpandKadds(line, el)
|
|||||||
(sym.size==0) ? symbol+1 : symbol, \
|
(sym.size==0) ? symbol+1 : symbol, \
|
||||||
sym.offset, sym.size);
|
sym.offset, sym.size);
|
||||||
|
|
||||||
*kp = dlm;
|
|
||||||
value = 2;
|
value = 2;
|
||||||
if ( sym.size != 0 )
|
if ( sym.size != 0 )
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
.\" along with this program; if not, write to the Free Software
|
.\" along with this program; if not, write to the Free Software
|
||||||
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
.\"
|
.\"
|
||||||
.TH SYSLOG.CONF 5 "24 November 1995" "Version 1.3" "Linux System Administration"
|
.TH SYSLOG.CONF 5 "1 January 1998" "Version 1.3" "Linux System Administration"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
syslog.conf \- syslogd(8) configuration file
|
syslog.conf \- syslogd(8) configuration file
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@ -120,7 +120,6 @@ field is capable to overwrite the preceding ones. Using this
|
|||||||
behavior you can exclude some priorities from the pattern.
|
behavior you can exclude some priorities from the pattern.
|
||||||
|
|
||||||
This
|
This
|
||||||
|
|
||||||
.BR syslogd (8)
|
.BR syslogd (8)
|
||||||
has a syntax extension to the original BSD source, that makes its use
|
has a syntax extension to the original BSD source, that makes its use
|
||||||
more intuitively. You may precede every priority with an equation sign
|
more intuitively. You may precede every priority with an equation sign
|
||||||
|
27
syslogd.c
27
syslogd.c
@ -316,6 +316,15 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88";
|
|||||||
*
|
*
|
||||||
* Sun Jun 15 16:23:29 MET DST 1997: Michael Alan Dorman
|
* Sun Jun 15 16:23:29 MET DST 1997: Michael Alan Dorman
|
||||||
* Some more glibc patches made by <mdorman@debian.org>.
|
* Some more glibc patches made by <mdorman@debian.org>.
|
||||||
|
*
|
||||||
|
* Thu Jan 1 16:04:52 CET 1998: Martin Schulze
|
||||||
|
* Applied patch from Herbert Thielen <Herbert.Thielen@lpr.e-technik.tu-muenchen.de>.
|
||||||
|
* This included some balance parentheses for emacs and a bug in
|
||||||
|
* the exclamation mark handling.
|
||||||
|
*
|
||||||
|
* Fixed small bug which caused syslogd to write messages to the
|
||||||
|
* wrong logfile under some very rare conditions. Thanks to
|
||||||
|
* Herbert Xu <herbert@gondor.apana.org.au> for fiddling this out.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -840,7 +849,7 @@ int main(argc, argv)
|
|||||||
(char *) &on, sizeof(on)) < 0 ) {
|
(char *) &on, sizeof(on)) < 0 ) {
|
||||||
logerror("setsockopt, suspending inet");
|
logerror("setsockopt, suspending inet");
|
||||||
}
|
}
|
||||||
else {
|
else if (AcceptRemote) {
|
||||||
if (bind(finet, (struct sockaddr *) &sin, \
|
if (bind(finet, (struct sockaddr *) &sin, \
|
||||||
sizeof(sin)) < 0) {
|
sizeof(sin)) < 0) {
|
||||||
logerror("bind, suspending inet");
|
logerror("bind, suspending inet");
|
||||||
@ -1406,13 +1415,13 @@ void logmsg(pri, msg, from, flags)
|
|||||||
/* new line, save it */
|
/* new line, save it */
|
||||||
if (f->f_prevcount)
|
if (f->f_prevcount)
|
||||||
fprintlog(f, (char *)from, 0, (char *)NULL);
|
fprintlog(f, (char *)from, 0, (char *)NULL);
|
||||||
|
f->f_prevpri = pri;
|
||||||
f->f_repeatcount = 0;
|
f->f_repeatcount = 0;
|
||||||
(void) strncpy(f->f_lasttime, timestamp, 15);
|
(void) strncpy(f->f_lasttime, timestamp, 15);
|
||||||
(void) strncpy(f->f_prevhost, from,
|
(void) strncpy(f->f_prevhost, from,
|
||||||
sizeof(f->f_prevhost));
|
sizeof(f->f_prevhost));
|
||||||
if (msglen < MAXSVLINE) {
|
if (msglen < MAXSVLINE) {
|
||||||
f->f_prevlen = msglen;
|
f->f_prevlen = msglen;
|
||||||
f->f_prevpri = pri;
|
|
||||||
(void) strcpy(f->f_prevline, msg);
|
(void) strcpy(f->f_prevline, msg);
|
||||||
fprintlog(f, (char *)from, flags, (char *)NULL);
|
fprintlog(f, (char *)from, flags, (char *)NULL);
|
||||||
} else {
|
} else {
|
||||||
@ -1426,6 +1435,9 @@ void logmsg(pri, msg, from, flags)
|
|||||||
(void) sigsetmask(omask);
|
(void) sigsetmask(omask);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#if FALSE
|
||||||
|
} /* balance parentheses for emacs */
|
||||||
|
#endif
|
||||||
|
|
||||||
void fprintlog(f, from, flags, msg)
|
void fprintlog(f, from, flags, msg)
|
||||||
register struct filed *f;
|
register struct filed *f;
|
||||||
@ -1638,6 +1650,9 @@ void fprintlog(f, from, flags, msg)
|
|||||||
f->f_prevcount = 0;
|
f->f_prevcount = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if FALSE
|
||||||
|
}} /* balance parentheses for emacs */
|
||||||
|
#endif
|
||||||
|
|
||||||
jmp_buf ttybuf;
|
jmp_buf ttybuf;
|
||||||
|
|
||||||
@ -1915,7 +1930,7 @@ void die(sig)
|
|||||||
|
|
||||||
/* Close the sockets. */
|
/* Close the sockets. */
|
||||||
close(funix);
|
close(funix);
|
||||||
close(inetm);
|
if (InetInuse) close(inetm);
|
||||||
|
|
||||||
/* Clean-up files. */
|
/* Clean-up files. */
|
||||||
(void) unlink(LogName);
|
(void) unlink(LogName);
|
||||||
@ -2112,6 +2127,9 @@ void init()
|
|||||||
(void) signal(SIGHUP, sighup_handler);
|
(void) signal(SIGHUP, sighup_handler);
|
||||||
dprintf("syslogd: restarted.\n");
|
dprintf("syslogd: restarted.\n");
|
||||||
}
|
}
|
||||||
|
#if FALSE
|
||||||
|
}}} /* balance parentheses for emacs */
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Crack a configuration file line
|
* Crack a configuration file line
|
||||||
@ -2168,6 +2186,9 @@ void cfline(line, f)
|
|||||||
*bp=*(bp+1);
|
*bp=*(bp+1);
|
||||||
*bp='\0';
|
*bp='\0';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ignorepri = 0;
|
||||||
|
}
|
||||||
if ( *buf == '=' )
|
if ( *buf == '=' )
|
||||||
{
|
{
|
||||||
singlpri = 1;
|
singlpri = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user