diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 1997-04-08 00:29:19 +0000 |
---|---|---|
committer | <> | 2013-02-25 15:20:59 +0000 |
commit | f8d9d05cfb1ea783457a14d3cf7fdf4d8fa450f2 (patch) | |
tree | 058251f5aa8af2365812daa56d936e91720a6027 /fakelog.c | |
download | tcp-wrappers-master.tar.gz |
Imported from /home/lorry/working-area/delta_tcp-wrappers/tcp_wrappers_7.6.tar.gz.HEADtcp_wrappers_7.6master
Diffstat (limited to 'fakelog.c')
-rw-r--r-- | fakelog.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/fakelog.c b/fakelog.c new file mode 100644 index 0000000..fa9e06e --- /dev/null +++ b/fakelog.c @@ -0,0 +1,62 @@ + /* + * This module intercepts syslog() library calls and redirects their output + * to the standard output stream. For interactive testing. + * + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ + +#ifndef lint +static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21"; +#endif + +#include <stdio.h> + +#include "mystdarg.h" + +/* openlog - dummy */ + +/* ARGSUSED */ + +openlog(name, logopt, facility) +char *name; +int logopt; +int facility; +{ + /* void */ +} + +/* vsyslog - format one record */ + +vsyslog(severity, fmt, ap) +int severity; +char *fmt; +va_list ap; +{ + char buf[BUFSIZ]; + + vprintf(percent_m(buf, fmt), ap); + printf("\n"); + fflush(stdout); +} + +/* syslog - format one record */ + +/* VARARGS */ + +VARARGS(syslog, int, severity) +{ + va_list ap; + char *fmt; + + VASTART(ap, int, severity); + fmt = va_arg(ap, char *); + vsyslog(severity, fmt, ap); + VAEND(ap); +} + +/* closelog - dummy */ + +closelog() +{ + /* void */ +} |