/* -*-c-*-
*
- * $Id: check.c,v 1.8 1998/06/18 15:10:44 mdw Exp $
+ * $Id: check.c,v 1.10 1999/05/04 16:17:12 mdw Exp $
*
* Check validity of requests
*
/*----- Revision history --------------------------------------------------*
*
* $Log: check.c,v $
+ * Revision 1.10 1999/05/04 16:17:12 mdw
+ * Change to header file name for parser. See log for `parse.h' for
+ * details.
+ *
+ * Revision 1.9 1998/06/19 13:48:16 mdw
+ * Set close-on-exec flag for UDP socket.
+ *
* Revision 1.8 1998/06/18 15:10:44 mdw
* SECURITY HOLE: the file descriptor for the secret key was left open and
* inherited by the target process. This is now fixed. Also set
#include "name.h"
#include "netg.h"
#include "rule.h"
-#include "parser.h"
+#include "parse.h"
#include "tx.h"
#include "userdb.h"
#include "utils.h"
if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
die("couldn't create socket: %s", strerror(errno));
+ if (fcntl(fd, F_SETFD, 1) < 0)
+ die("couldn't set close-on-exec flag for socket: %s", strerror(errno));
/* --- Bind myself to some address --- */