summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-11-21 04:30:29 +0000
committerpeter <peter@FreeBSD.org>1995-11-21 04:30:29 +0000
commit94adaf08376d1744cb6e28b284689318489c0524 (patch)
tree29a3154b7ac44c50ee23db038a588ac8c943c334
parent6dd6ca242725567d1b9850124fdeb3b14ac4d31b (diff)
downloadFreeBSD-ports-94adaf08376d1744cb6e28b284689318489c0524.zip
FreeBSD-ports-94adaf08376d1744cb6e28b284689318489c0524.tar.gz
two minor adjustments to ssh for freebsd specific issues:
patch-ac: call setsid() before setlogin() in the child (when emulating rsh) otherwise the setlogin() will fail when/if the proposed setlogin() changes go in. Otherwise it silently fails and may leave the login name of the user session as "root" (depending on how sshd was started). Without the proposed kernel change, it harmlessly sets the login name of the user's session. patch-ad: patch the #ifdef botch that stopped a ssh login from using and updating the lastlog file. This is because we have struct lastlog defined inside utmp.h rather than a lastlog.h include file like it was expecting.
-rw-r--r--security/ssh/files/patch-ac14
-rw-r--r--security/ssh2/files/patch-ac14
2 files changed, 28 insertions, 0 deletions
diff --git a/security/ssh/files/patch-ac b/security/ssh/files/patch-ac
new file mode 100644
index 0000000..c2c53c0
--- /dev/null
+++ b/security/ssh/files/patch-ac
@@ -0,0 +1,14 @@
+*** sshd.c.old Sun Oct 1 11:16:22 1995
+--- sshd.c Tue Nov 21 02:03:24 1995
+***************
+*** 1581,1586 ****
+--- 1581,1589 ----
+ log_init(av0, debug_flag && !inetd_flag, debug_flag,
+ options.quiet_mode, options.log_facility);
+
++ #ifdef HAVE_SETSID
++ setsid();
++ #endif
+ #ifdef USE_PIPES
+ /* Redirect stdin. We close the parent side of the socket pair,
+ and make the child side the standard input. */
diff --git a/security/ssh2/files/patch-ac b/security/ssh2/files/patch-ac
new file mode 100644
index 0000000..c2c53c0
--- /dev/null
+++ b/security/ssh2/files/patch-ac
@@ -0,0 +1,14 @@
+*** sshd.c.old Sun Oct 1 11:16:22 1995
+--- sshd.c Tue Nov 21 02:03:24 1995
+***************
+*** 1581,1586 ****
+--- 1581,1589 ----
+ log_init(av0, debug_flag && !inetd_flag, debug_flag,
+ options.quiet_mode, options.log_facility);
+
++ #ifdef HAVE_SETSID
++ setsid();
++ #endif
+ #ifdef USE_PIPES
+ /* Redirect stdin. We close the parent side of the socket pair,
+ and make the child side the standard input. */
OpenPOWER on IntegriCloud