Fork before performing tcpwrappers check.

Don't rely on nonstandard bsd_signal() function, instead
 require that the platform has sigaction().  This is 2001,
 after all.  This may resolve some potential portability
 problems.

Log a message if memory allocation fails, instead of dying silently.

Clean up the main dispatch loop.

Use <sysexits.h> for exit codes, if it exists.

Reformat tftpd.c to match the other files.
This commit is contained in:
hpa 2001-07-20 06:59:54 +00:00
parent e4650ab86f
commit 81822ea738
10 changed files with 862 additions and 711 deletions

View file

@ -15,6 +15,9 @@
* Prototypes for regular-expression based filename remapping.
*/
#ifndef TFTPD_REMAP_H
#define TFTPD_REMAP_H
#include <stdlib.h>
#include <stdio.h>
#include "../config.h"
@ -30,4 +33,6 @@ struct rule *parserulefile(FILE *);
/* Execute a rule set on a string; returns a malloc'd new string. */
char *rewrite_string(const char *, const struct rule *, int);
#endif
#endif /* WITH_REGEX */
#endif /* TFTPD_REMAP_H */