tcpd.c (44744) | tcpd.c (56977) |
---|---|
1 /* 2 * General front end for stream and datagram IP services. This program logs 3 * the remote host name and then invokes the real daemon. For example, 4 * install as /usr/etc/{tftpd,fingerd,telnetd,ftpd,rlogind,rshd,rexecd}, 5 * after saving the real daemons in the directory specified with the 6 * REAL_DAEMON_DIR macro. This arrangement requires that the network daemons 7 * are started by inetd or something similar. Connections and diagnostics 8 * are logged through syslog(3). 9 * 10 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. | 1 /* 2 * General front end for stream and datagram IP services. This program logs 3 * the remote host name and then invokes the real daemon. For example, 4 * install as /usr/etc/{tftpd,fingerd,telnetd,ftpd,rlogind,rshd,rexecd}, 5 * after saving the real daemons in the directory specified with the 6 * REAL_DAEMON_DIR macro. This arrangement requires that the network daemons 7 * are started by inetd or something similar. Connections and diagnostics 8 * are logged through syslog(3). 9 * 10 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. |
11 * 12 * $FreeBSD: head/contrib/tcp_wrappers/tcpd.c 56977 2000-02-03 10:27:03Z shin $ |
|
11 */ 12 13#ifndef lint 14static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; 15#endif 16 17/* System libraries. */ 18 --- 96 unchanged lines hidden (view full) --- 115 116#ifdef HOSTS_ACCESS 117 if (!hosts_access(&request)) 118 refuse(&request); 119#endif 120 121 /* Report request and invoke the real daemon program. */ 122 | 13 */ 14 15#ifndef lint 16static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; 17#endif 18 19/* System libraries. */ 20 --- 96 unchanged lines hidden (view full) --- 117 118#ifdef HOSTS_ACCESS 119 if (!hosts_access(&request)) 120 refuse(&request); 121#endif 122 123 /* Report request and invoke the real daemon program. */ 124 |
125#ifdef INET6 126 syslog(allow_severity, "connect from %s (%s)", 127 eval_client(&request), eval_hostaddr(request.client)); 128#else |
|
123 syslog(allow_severity, "connect from %s", eval_client(&request)); | 129 syslog(allow_severity, "connect from %s", eval_client(&request)); |
130#endif |
|
124 closelog(); 125 (void) execv(path, argv); 126 syslog(LOG_ERR, "error: cannot execute %s: %m", path); 127 clean_exit(&request); 128 /* NOTREACHED */ 129} | 131 closelog(); 132 (void) execv(path, argv); 133 syslog(LOG_ERR, "error: cannot execute %s: %m", path); 134 clean_exit(&request); 135 /* NOTREACHED */ 136} |