1 --- hpn-ssh-hpn-18.4.2/configure.ac.orig
2 +++ hpn-ssh-hpn-18.4.2/configure.ac
7 +# Check whether user wants TCP wrappers support
9 +AC_ARG_WITH([tcp-wrappers],
10 + [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
12 + if test "x$withval" != "xno" ; then
14 + saved_LDFLAGS="$LDFLAGS"
15 + saved_CPPFLAGS="$CPPFLAGS"
16 + if test -n "${withval}" && \
17 + test "x${withval}" != "xyes"; then
18 + if test -d "${withval}/lib"; then
19 + if test -n "${need_dash_r}"; then
20 + LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
22 + LDFLAGS="-L${withval}/lib ${LDFLAGS}"
25 + if test -n "${need_dash_r}"; then
26 + LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
28 + LDFLAGS="-L${withval} ${LDFLAGS}"
31 + if test -d "${withval}/include"; then
32 + CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
34 + CPPFLAGS="-I${withval} ${CPPFLAGS}"
38 + AC_MSG_CHECKING([for libwrap])
39 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
40 +#include <sys/types.h>
41 +#include <sys/socket.h>
42 +#include <netinet/in.h>
44 +int deny_severity = 0, allow_severity = 0;
48 + AC_MSG_RESULT([yes])
49 + AC_DEFINE([LIBWRAP], [1],
51 + TCP Wrappers support])
52 + SSHDLIBS="$SSHDLIBS -lwrap"
55 + AC_MSG_ERROR([*** libwrap missing])
63 # Check whether user wants to use ldns
67 echo " OSF SIA support: $SIA_MSG"
68 echo " KerberosV support: $KRB5_MSG"
69 echo " SELinux support: $SELINUX_MSG"
70 +echo " TCP Wrappers support: $TCPW_MSG"
71 echo " libedit support: $LIBEDIT_MSG"
72 echo " libldns support: $LDNS_MSG"
73 echo " Solaris process contract support: $SPC_MSG"
74 --- hpn-ssh-hpn-18.4.2/hpnsshd.8.orig
75 +++ hpn-ssh-hpn-18.4.2/hpnsshd.8
77 This file should be writable only by the user, and need not be
78 readable by anyone else.
80 +.It Pa /etc/hosts.allow
81 +.It Pa /etc/hosts.deny
82 +Access controls that should be enforced by tcp-wrappers are defined here.
83 +Further details are described in
86 .It Pa /etc/hosts.equiv
87 This file is for host-based authentication (see
91 .Xr hpnssh-keyscan 1 ,
96 .Xr hpnsshd_config 5 ,
97 --- hpn-ssh-hpn-18.4.2/sshd.c.orig
98 +++ hpn-ssh-hpn-18.4.2/sshd.c
100 #include "srclimit.h"
108 +#endif /* LIBWRAP */
115 #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
116 #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
117 @@ -2218,6 +2229,24 @@
118 #ifdef SSH_AUDIT_EVENTS
119 audit_connection_from(ssh, remote_ip, remote_port);
122 + allow_severity = options.log_facility|LOG_INFO;
123 + deny_severity = options.log_facility|LOG_WARNING;
124 + /* Check whether logins are denied from this host. */
125 + if (ssh_packet_connection_is_on_socket(ssh)) {
126 + struct request_info req;
128 + request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
131 + if (!hosts_access(&req)) {
132 + debug("Connection refused by tcp wrapper");
135 + fatal("libwrap refuse returns");
138 +#endif /* LIBWRAP */
140 rdomain = ssh_packet_rdomain_in(ssh);