]> andersk Git - openssh.git/commitdiff
- (dtucker) [session.c] Bug #817: Clear loginmsg after fork to prevent
authordtucker <dtucker>
Sat, 27 Mar 2004 05:44:21 +0000 (05:44 +0000)
committerdtucker <dtucker>
Sat, 27 Mar 2004 05:44:21 +0000 (05:44 +0000)
   duplicate login messages for mutli-session logins.  ok djm@

ChangeLog
session.c

index 4e48a6d9c7680f97abf9ee4209fd682f9b3d00cd..d4c56f5443a5a6076fbb0f5a7743fc6be0de01d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index af2e71992726aa9aea66909a167ca2918a906bbd..6ab3484e2218a84f4c93e011a6af9d7a8f8a6bac 100644 (file)
--- a/session.c
+++ b/session.c
@@ -491,6 +491,13 @@ do_exec_no_pty(Session *s, const char *command)
        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.
This page took 0.41227 seconds and 5 git commands to generate.