Subject: Re: Bug found: help to isolate it
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Lista de NetBSD Users <list10@sepc.edu.mx>
List: netbsd-users
Date: 05/23/2002 13:44:19
On Wed, 22 May 2002, Manuel Bouyer wrote:
> Well, this machine looks really standart. pptp doesn't send a lot of
> data to syslog, does it ?
A lot of messages occurs when the client is win98se and the patch
of microsoft. Millenium and XP works fine and the clients are
of these.
> I think we really need a core dump from syslogd (kill -ABRT) to have
> more infos.
Yes, I am ready... Thanks Manuel.
Heron Gallegos
-------------------------------------------
Program to kill syslogd when you are a *simple user*
#include <signal.h>
#include <stdio.h>
#define PIDFILE "/var/run/syslogd.pid"
main () {
int spid; /* syslogd PID */
int getspid();
spid = getspid ();
if (kill(spid, SIGABRT) != 0) {
fprintf(stderr, "No pude matar syslogd\n");
exit(0);
}
fprintf(stdout, "Core file is /syslogd.core\n");
}
int getspid () {
FILE *fp;
int num;
if ((fp = fopen(PIDFILE, "r")) == NULL) {
fprintf(stderr, "No pude abrir %s\n", PIDFILE);
exit(0);
}
if (fscanf(fp, "%d\n", &num) != 1) {
fprintf(stderr, "No pude leer %s\n", PIDFILE);
fclose(fp);
exit(0);
}
fclose(fp);
return(num);
}
And dont forget chown root your program
and chmod 4755
-rwsr-xr-x 1 root staff 5783 May 19 19:14 mata
-rw-r--r-- 1 root wheel 593 May 19 19:14 mata.c
... It works fine