duplicate login messages for mutli-session logins. ok djm@
+20040327
+ - (dtucker) [session.c] Bug #817: Clear loginmsg after fork to prevent
+ duplicate login messages for mutli-session logins. ok djm@
+
20040322
- (djm) [sshd.c] Drop supplemental groups if started as root
- (djm) OpenBSD CVS Sync
close(inout[0]);
close(err[0]);
+ /*
+ * Clear loginmsg, since it's the child's responsibility to display
+ * it to the user, otherwise multiple sessions may accumulate
+ * multiple copies of the login messages.
+ */
+ buffer_clear(&loginmsg);
+
/*
* Enter the interactive session. Note: server_loop must be able to
* handle the case that fdin and fdout are the same.