[login - The unix login(1), tweaked for Cygwin] branch master, updated. v1_12-1-gc8dbcec

corinna-9JcytcrH/[email protected]
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/login.git;h=c8dbcec5c080697fb9726d89e7b6646a5cdc0e17

commit c8dbcec5c080697fb9726d89e7b6646a5cdc0e17
Author: Takashi Yano <[email protected]>
Date:   Sat Mar 9 10:11:54 2019 +0900

    Fix the issue that GNU screen and tmux cannot read tty input if they are started in a telnet session.
    
    * login.c (main): Add chown() and chmod() to change the ownership
    and the permissions of tty.


Diff:
---
 login.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/login.c b/login.c
index 271d5e8..918f228 100644
--- a/login.c
+++ b/login.c
@@ -280,6 +280,8 @@ main (int argc, char **argv)
 	  sleep ((u_int) ((cnt - 3) * 5));
 	}
     }
+  chown (ttyn, pwd->pw_uid, pwd->pw_gid);
+  chmod (ttyn, 0600);
 
   /* committed to login -- turn off timeout */
   (void) alarm ((u_int) 0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.