forked from Lainports/freebsd-ports
- fix Kerberos knob [2] - fix build on 9.0 [3] - fix deinstall with various knobs [4] - fix LPK knob [5] PR: ports/161818 [1], ports/144597 [2], ports/160389 [3] ports/150493, ports/156926 [4], ports/155456 [5] Submitted by: "Grzegorz Blach" <magik@roorback.net> [1], [2], [4], [5] pluknet [3] Reported by: Jonathan <lordsith49@hotmail.com> [2] Kevin Thompson <antiduh@csh.rit.edu> [4] Alexey Remizov <alexey@remizov.org> [5]
46 lines
1,018 B
C
46 lines
1,018 B
C
--- sshd.c.orig 2010-04-15 23:56:22.000000000 -0600
|
|
+++ sshd.c 2010-09-14 16:14:13.000000000 -0600
|
|
@@ -83,6 +83,13 @@
|
|
#include <prot.h>
|
|
#endif
|
|
|
|
+#ifdef __FreeBSD__
|
|
+#include <resolv.h>
|
|
+#ifdef GSSAPI
|
|
+#include "ssh-gss.h"
|
|
+#endif
|
|
+#endif
|
|
+
|
|
#include "xmalloc.h"
|
|
#include "ssh.h"
|
|
#include "ssh1.h"
|
|
@@ -1864,6 +1871,29 @@
|
|
signal(SIGCHLD, SIG_DFL);
|
|
signal(SIGINT, SIG_DFL);
|
|
|
|
+#ifdef __FreeBSD__
|
|
+ /*
|
|
+ * Initialize the resolver. This may not happen automatically
|
|
+ * before privsep chroot().
|
|
+ */
|
|
+ if ((_res.options & RES_INIT) == 0) {
|
|
+ debug("res_init()");
|
|
+ res_init();
|
|
+ }
|
|
+#ifdef GSSAPI
|
|
+ /*
|
|
+ * Force GSS-API to parse its configuration and load any
|
|
+ * mechanism plugins.
|
|
+ */
|
|
+ {
|
|
+ gss_OID_set mechs;
|
|
+ OM_uint32 minor_status;
|
|
+ gss_indicate_mechs(&minor_status, &mechs);
|
|
+ gss_release_oid_set(&minor_status, &mechs);
|
|
+ }
|
|
+#endif
|
|
+#endif
|
|
+
|
|
/*
|
|
* Register our connection. This turns encryption off because we do
|
|
* not have a key.
|