[PATCH v5 1/1] Cygwin: pty: add pseudo console support.

Takashi Yano takashi.yano@nifty.ne.jp
Mon Aug 12 12:07:00 GMT 2019


Hi Corinna,

On Mon, 24 Jun 2019 12:53:37 +0200
Corinna Vinschen wrote:
> Any news on this?  Do you consider the latest state from April
> stable enough for master?

First, I apologize for a very lazy response. To tell the truth,
there has not been much progress.

Anyway, I will post v6 soon. It is almost stable.

In my test, the biggest problem is the failure to attach console
after setuid() in sshd if the user belongs to "Users" group only.
This causes mis-synchronization in the screen buffer.

To reproduce this problem, login to cygwin via ssh and execute
ssh again. Then some debug messages are shown as follows.

Last login: Mon Aug 12 20:15:54 2019 from ::1
CYGWIN_NT-10.0-WOW Express5800-S70 3.1.0(0.340/5/3) 2019-08-12 09:42 i686 Cygwin
[yano@Express5800-S70 ~]$ ssh localhost
      1 [main] ssh 1927 fhandler_pty_slave::push_to_pcon_screenbuffer: pty1: AttachConsole(21124) failed. (0x612E3C50) 00000005
     52 [main] ssh 1927 fhandler_pty_slave::push_to_pcon_screenbuffer: pty1: AttachConsole(21124) failed. (0x612E3C50) 00000005
yano@localhost's password:

That is, if the following commands are executed sequentially:

ssh localhost
ssh localhost (again)
ls
exit
cmd

the result of ls disappears from the screen.

This problem does not occur if the user belongs to "Administrators"
group.

It is reasonable to fail to attach console to
cygwin-console-helper.exe because it is running as system
service account, however, attaching to other processes executed
by myself also fails in the ssh session.

I have been stuck with this issue in the last several weeks.
Any advice will be appreciated. 

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>



More information about the Cygwin-developers mailing list