* DragonFly's libc manages environ in such a way that if sshd attempts to
free it, libc blows up and causes sshd to crash.
* This may not be the best fix but for now I really do not want to
completely rewrite libc's environment handling code.
Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
(void) setusercontext(lc, pw, pw->pw_uid,
LOGIN_SETENV|LOGIN_SETPATH);
copy_environment(environ, &env, &envsize);
+#if 0
+ /*
+ * This interferes with libc's management of the environment
+ * in horrible ways that can cause sshd to crash.
+ */
for (var = environ; *var != NULL; ++var)
xfree(*var);
xfree(environ);
+#endif
environ = senv;
#else /* HAVE_LOGIN_CAP */
# ifndef HAVE_CYGWIN