/* -*-c-*-
*
- * $Id: identify.c,v 1.8 2003/11/29 20:36:07 mdw Exp $
- *
* Identifies and logs the client of a connection
*
* (c) 1999 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * `fw' is distributed in the hope that it will be useful,
+ *
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: identify.c,v $
- * Revision 1.8 2003/11/29 20:36:07 mdw
- * Privileged outgoing connections.
- *
- * Revision 1.7 2002/02/22 23:43:32 mdw
- * Call @xfree@ rather than @free@.
- *
- * Revision 1.6 2001/06/22 19:36:49 mdw
- * Enlarge the identity buffer.
- *
- * Revision 1.5 1999/10/10 16:45:34 mdw
- * Modified to use new mLib resolver and ident client.
- *
- * Revision 1.4 1999/07/27 18:30:53 mdw
- * Various minor portability fixes.
- *
- * Revision 1.3 1999/07/26 23:26:21 mdw
- * Minor modifications for new design.
- *
- * Revision 1.2 1999/07/03 13:56:59 mdw
- * Log connections to syslog or stderr as appropriate.
- *
- * Revision 1.1.1.1 1999/07/01 08:56:23 mdw
- * Initial revision.
- *
- */
-
-/*----- Header files ------------------------------------------------------*/
-
-#include "config.h"
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <syslog.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <mLib/alloc.h>
-#include <mLib/bres.h>
-#include <mLib/conn.h>
-#include <mLib/dstr.h>
-#include <mLib/ident.h>
-#include <mLib/report.h>
-#include <mLib/sel.h>
-#include <mLib/selbuf.h>
-#include <mLib/str.h>
-
-#include "fw.h"
-#include "identify.h"
+#include "fwd.h"
/*----- Magic numbers -----------------------------------------------------*/
/* --- Dispose of the block --- */
REFFD_DEC(i->q.r);
+ xfree((/*unconst*/ char *)i->q.desc);
xfree(i);
}
static void id_timer(struct timeval *tv, void *vp)
{
id *i = vp;
+ i->state |= S_TIMER;
id_done(i);
}
i = xmalloc(sizeof(*i));
i->q = *q;
+ i->q.desc = xstrdup(q->desc);
REFFD_INC(i->q.r);
str_sanitize(i->host, inet_ntoa(q->rsin.sin_addr), sizeof(i->host));