Hi, I am trying to update our Cygwin libraries at work, which we use on many servers to provide OpenSSH services. I have been making update packages for many years from a Cygwin install on a development server, and went to update our systems to the latest OpenSSH 8.3p1 build.
However after making the update package, I found that the Windows Event Log (or if Syslogd is setup – which we do have in our general Cygwin deployment /var/log/messages) gets two errors when using any version of the Cygwin Libraries after the 3.1.4 build. Sep 14 12:06:48 hostname sshd: PID 2093: error: Failed to disconnect from controlling tty. Sep 14 12:06:48 hostname sshd: PID 2093: error: ioctl(TIOCSCTTY): Operation not permitted I first tried rolling back to older OpenSSH packages (tried 8.2, 8.1 and what we had been using 7.8), but found that all versions still had the same error in the ssh connections. I then tried older builds of the core Cygwin updates and found that version 3.1.4 and earlier don’t display this error when the SSH connection occurs, but 3.1.5 and later (tested up to 3.1.7) do show this error. It doesn’t actually seem to affect the SSH connections, they work fine, but it logs two errors every time. I found the lines that produce these errors in the sshpty.c file (https://github.com/openssh/openssh-portable/blob/master/sshpty.c), lines 120 and 127 in the source code write these errors out, but I can’t see specifically what I would need to change to fix this, and I checked that the source code for older versions of OpenSSH haven’t changed for many versions (checked the master branch, and versions back to the 7.8 build we were on before in the sshpty.c source code). Anyway, I think its a bug that has been introduced in 3.1.5 version or later, or possibly it has always been happening but just not reported before? I’ve attached a cygcheck.exe -s output (I removed a few bits that for internal security I wouldn’t want to post), but in my test Cygwin x64 build I can see this problem is resolved by rolling back to the 3.1.4 cygwin core libraries. Any help in resolving this issue would be great. Peter Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Cygwin Configuration Diagnostics Current System Time: Mon Sep 14 18:02:40 2020 Windows 2012 R2 Server Datacenter Ver 6.3 Build 9600 Running in Terminal Service session Path: C:\Program Files\avs\bin C:\Program Files\avs\bin32 C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0\ C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\ C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ C:\Program Files\Microsoft SQL Server\120\Tools\Binn\ C:\Program Files\Microsoft SQL Server\120\DTS\Binn\ C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn c:\Program Files\Microsoft SQL Server\100\Tools\Binn c:\Program Files\Microsoft SQL Server\100\DTS\Binn C:\Program Files\Microsoft DNX\Dnvm C:\Program Files (x86)\Microsoft SMS Installer\Installer Step-up Utility\Apps C:\Program Files (x86)\Microsoft SMS Installer\Installer Step-up Utility\Apps\Extensions C:\Program Files (x86)\ExchangeMapi C:\Program Files\Microsoft\Web Platform Installer C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\ C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\ . Output from F:\cygwin64\bin\id.exe UID: 1051173(xxxxxx admin) GID: 1049089(Domain Users) 1049089(Domain Users) 197612(HOSTNAME+HelpLibraryUpdaters) 197617(HOSTNAME+WSS_ADMIN_WPG) 559(Performance Log Users) 545(Users) 544(Administrators) 14(REMOTE INTERACTIVE LOGON) 4(INTERACTIVE) 11(Authenticated Users) 15(This Organization) 4095(CurrentSession) 66048(LOCAL) 1049088(Domain Admins) 405504(High Mandatory Level) SysDir: C:\Windows\system32 WinDir: C:\Windows Path = 'C:\Program Files\avs\bin;C:\Program Files\avs\bin32;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\CITEC\PROGRAMS\I386\TOOLS;C:\CITEC\SPLUNK;C:\Program Files (x86)\OpenSSH\Bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Users\boardp_admin.QGI\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\Microsoft SMS Installer\Installer Step-up Utility\Apps;C:\Program Files (x86)\Microsoft SMS Installer\Installer Step-up Utility\Apps\Extensions;C:\Program Files (x86)\ExchangeMapi;E:\oracle\instantclient_12_1;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;' Use '-r' to scan registry obcaseinsensitive set to 1 Cygwin installations found in the registry: System: Key: 26046373354fe4fc Path: F:\cygwin64 User: Key: b99ad95be22e68fe Path: F:\cygwin c: hd NTFS 143006Mb 84% CP CS UN PA FC QU d: hd NTFS 35708Mb 14% CP CS UN PA FC QU SQLDATA e: hd NTFS 40829Mb 60% CP CS UN PA FC QU SQL Backup and Email f: hd NTFS 10205Mb 19% CP CS UN PA FC QU Cygwin g: hd NTFS 102269Mb 31% CP CS UN PA FC QU DISTRIBS z: cd N/A N/A F:\cygwin64 / system binary,auto F:\cygwin64\bin /usr/bin system binary,auto F:\cygwin64\lib /usr/lib system binary,auto cygdrive prefix /cygdrive user binary,posix=0,auto 39k 2016/09/19 .\cygargp-0.dll 19k 2018/12/20 .\cygattr-1.dll 254k 2020/03/31 .\cygblkid-1.dll 66k 2019/07/21 .\cygbz2-1.dll 42k 2020/02/17 .\cygcbor-0.dll 13k 2019/01/02 .\cygcom_err-2.dll 39k 2017/09/03 .\cygcrypt-0.dll 194k 2019/04/03 .\cygcrypt-2.dll 2273k 2018/04/03 .\cygcrypto-1.0.0.dll 2451k 2020/04/08 .\cygcrypto-1.1.dll 154k 2013/10/20 .\cygedit-0.dll 353k 2020/03/31 .\cygfdisk-1.dll 27k 2015/11/17 .\cygffi-6.dll 118k 2020/02/19 .\cygfido2-1.dll 56k 2019/07/28 .\cygformw-10.dll 73k 2020/04/16 .\cyggcc_s-seh-1.dll 46k 2019/07/10 .\cyggdbm-4.dll 582k 2020/03/01 .\cyggmp-10.dll 938k 2017/05/02 .\cyggnutls-28.dll 1472k 2019/07/29 .\cyggnutls-30.dll 24k 2017/05/02 .\cyggnutls-openssl-27.dll 274k 2018/03/16 .\cyggssapi_krb5-2.dll 33k 2017/02/13 .\cyghistory7.dll 167k 2016/03/13 .\cyghogweed-2.dll 168k 2019/02/19 .\cyghogweed-4.dll 1007k 2020/07/13 .\cygiconv-2.dll 196k 2014/12/06 .\cygidn-11.dll 114k 2019/07/29 .\cygidn2-0.dll 42k 2016/10/23 .\cygintl-8.dll 192k 2018/03/16 .\cygk5crypto-3.dll 754k 2018/03/16 .\cygkrb5-3.dll 37k 2018/03/16 .\cygkrb5support-0.dll 144k 2019/07/21 .\cyglzma-5.dll 125k 2018/03/18 .\cygmagic-1.dll 168k 2018/01/23 .\cygman-2-7-6-1.dll 22k 2018/01/23 .\cygmandb-2-7-6-1.dll 28k 2019/07/28 .\cygmenuw-10.dll 346k 2017/08/01 .\cygmpfr-4.dll 2664k 2020/07/11 .\cygmpfr-6.dll 301k 2019/07/28 .\cygncursesw-10.dll 180k 2016/03/13 .\cygnettle-4.dll 205k 2019/02/19 .\cygnettle-6.dll 1020k 2020/03/27 .\cygp11-kit-0.dll 14k 2019/07/28 .\cygpanelw-10.dll 474k 2020/03/29 .\cygpcre-1.dll 41k 2019/09/12 .\cygpipeline-1.dll 41k 2016/07/13 .\cygpopt-0.dll 54k 2016/09/20 .\cygprocps-5.dll 65k 2019/07/21 .\cygpsl-5.dll 219k 2017/02/13 .\cygreadline7.dll 11k 2015/07/17 .\cygsigsegv-2.dll 14k 2020/02/19 .\cygsk-libfido2.dll 156k 2020/03/31 .\cygsmartcols-1.dll 403k 2018/04/03 .\cygssl-1.0.0.dll 506k 2020/04/08 .\cygssl-1.1.dll 12k 2017/09/09 .\cygssp-0.dll 1681k 2020/04/16 .\cygstdc++-6.dll 68k 2019/07/29 .\cygtasn1-6.dll 57k 2019/07/28 .\cygticw-10.dll 1612k 2018/08/16 .\cygunistring-2.dll 27k 2020/03/31 .\cyguuid-1.dll 30k 2013/11/15 .\cygwrap-0.dll 83k 2017/03/03 .\cygz.dll 3473k 2020/08/22 .\cygwin1.dll Cygwin DLL version info: DLL version: 3.1.7 DLL epoch: 19 DLL old termios: 5 DLL malloc env: 28 Cygwin conv: 181 API major: 0 API minor: 340 Shared data: 5 DLL identifier: cygwin1 Mount registry: 3 Cygwin registry name: Cygwin Installations name: Installations Cygdrive default prefix: Build date: Shared id: cygwin1S5 39k 2016/09/19 F:\cygwin64\bin\cygargp-0.dll 19k 2018/12/20 F:\cygwin64\bin\cygattr-1.dll 254k 2020/03/31 F:\cygwin64\bin\cygblkid-1.dll 66k 2019/07/21 F:\cygwin64\bin\cygbz2-1.dll 42k 2020/02/17 F:\cygwin64\bin\cygcbor-0.dll 13k 2019/01/02 F:\cygwin64\bin\cygcom_err-2.dll 39k 2017/09/03 F:\cygwin64\bin\cygcrypt-0.dll 194k 2019/04/03 F:\cygwin64\bin\cygcrypt-2.dll 2273k 2018/04/03 F:\cygwin64\bin\cygcrypto-1.0.0.dll 2451k 2020/04/08 F:\cygwin64\bin\cygcrypto-1.1.dll 154k 2013/10/20 F:\cygwin64\bin\cygedit-0.dll 353k 2020/03/31 F:\cygwin64\bin\cygfdisk-1.dll 27k 2015/11/17 F:\cygwin64\bin\cygffi-6.dll 118k 2020/02/19 F:\cygwin64\bin\cygfido2-1.dll 56k 2019/07/28 F:\cygwin64\bin\cygformw-10.dll 73k 2020/04/16 F:\cygwin64\bin\cyggcc_s-seh-1.dll 46k 2019/07/10 F:\cygwin64\bin\cyggdbm-4.dll 582k 2020/03/01 F:\cygwin64\bin\cyggmp-10.dll 938k 2017/05/02 F:\cygwin64\bin\cyggnutls-28.dll 1472k 2019/07/29 F:\cygwin64\bin\cyggnutls-30.dll 24k 2017/05/02 F:\cygwin64\bin\cyggnutls-openssl-27.dll 274k 2018/03/16 F:\cygwin64\bin\cyggssapi_krb5-2.dll 33k 2017/02/13 F:\cygwin64\bin\cyghistory7.dll 167k 2016/03/13 F:\cygwin64\bin\cyghogweed-2.dll 168k 2019/02/19 F:\cygwin64\bin\cyghogweed-4.dll 1007k 2020/07/13 F:\cygwin64\bin\cygiconv-2.dll 196k 2014/12/06 F:\cygwin64\bin\cygidn-11.dll 114k 2019/07/29 F:\cygwin64\bin\cygidn2-0.dll 42k 2016/10/23 F:\cygwin64\bin\cygintl-8.dll 192k 2018/03/16 F:\cygwin64\bin\cygk5crypto-3.dll 754k 2018/03/16 F:\cygwin64\bin\cygkrb5-3.dll 37k 2018/03/16 F:\cygwin64\bin\cygkrb5support-0.dll 144k 2019/07/21 F:\cygwin64\bin\cyglzma-5.dll 125k 2018/03/18 F:\cygwin64\bin\cygmagic-1.dll 168k 2018/01/23 F:\cygwin64\bin\cygman-2-7-6-1.dll 22k 2018/01/23 F:\cygwin64\bin\cygmandb-2-7-6-1.dll 28k 2019/07/28 F:\cygwin64\bin\cygmenuw-10.dll 346k 2017/08/01 F:\cygwin64\bin\cygmpfr-4.dll 2664k 2020/07/11 F:\cygwin64\bin\cygmpfr-6.dll 301k 2019/07/28 F:\cygwin64\bin\cygncursesw-10.dll 180k 2016/03/13 F:\cygwin64\bin\cygnettle-4.dll 205k 2019/02/19 F:\cygwin64\bin\cygnettle-6.dll 1020k 2020/03/27 F:\cygwin64\bin\cygp11-kit-0.dll 14k 2019/07/28 F:\cygwin64\bin\cygpanelw-10.dll 474k 2020/03/29 F:\cygwin64\bin\cygpcre-1.dll 41k 2019/09/12 F:\cygwin64\bin\cygpipeline-1.dll 41k 2016/07/13 F:\cygwin64\bin\cygpopt-0.dll 54k 2016/09/20 F:\cygwin64\bin\cygprocps-5.dll 65k 2019/07/21 F:\cygwin64\bin\cygpsl-5.dll 219k 2017/02/13 F:\cygwin64\bin\cygreadline7.dll 11k 2015/07/17 F:\cygwin64\bin\cygsigsegv-2.dll 14k 2020/02/19 F:\cygwin64\bin\cygsk-libfido2.dll 156k 2020/03/31 F:\cygwin64\bin\cygsmartcols-1.dll 403k 2018/04/03 F:\cygwin64\bin\cygssl-1.0.0.dll 506k 2020/04/08 F:\cygwin64\bin\cygssl-1.1.dll 12k 2017/09/09 F:\cygwin64\bin\cygssp-0.dll 1681k 2020/04/16 F:\cygwin64\bin\cygstdc++-6.dll 68k 2019/07/29 F:\cygwin64\bin\cygtasn1-6.dll 57k 2019/07/28 F:\cygwin64\bin\cygticw-10.dll 1612k 2018/08/16 F:\cygwin64\bin\cygunistring-2.dll 27k 2020/03/31 F:\cygwin64\bin\cyguuid-1.dll 30k 2013/11/15 F:\cygwin64\bin\cygwrap-0.dll 83k 2017/03/03 F:\cygwin64\bin\cygz.dll 3473k 2020/08/22 F:\cygwin64\bin\cygwin1.dll Cygwin DLL version info: DLL version: 3.1.7 DLL epoch: 19 DLL old termios: 5 DLL malloc env: 28 Cygwin conv: 181 API major: 0 API minor: 340 Shared data: 5 DLL identifier: cygwin1 Mount registry: 3 Cygwin registry name: Cygwin Installations name: Installations Cygdrive default prefix: Build date: Shared id: cygwin1S5 Service : cygsshd Display name : CYGWIN cygsshd Current State : Stopped Command : /usr/sbin/sshd -D Cygwin Package Information Package Version Status _autorebase 001007-1 OK alternatives 1.3.30c-10 OK base-cygwin 3.8-1 OK base-files 4.3-2 OK bash 4.4.12-3 OK bzip2 1.0.8-1 OK ca-certificates 2.40-1 OK coreutils 8.26-2 OK crypto-policies 20190218-1 OK csih 0.9.11-1 OK cygrunsrv 1.62-1 OK cygutils 1.4.16-2 OK cygwin 3.1.7-1 OK dash 0.5.9.1-1 OK diffutils 3.5-2 OK dos2unix 7.3.4-1 OK editrights 1.03-1 OK file 5.32-1 OK findutils 4.6.0-1 OK gawk 5.1.0-1 OK getent 2.18.90-4 OK grep 3.0-2 OK groff 1.22.4-1 OK gzip 1.8-1 OK hostname 3.13-1 OK inetutils 1.9.4-1 OK inetutils-server 1.9.4-1 OK info 6.7-1 OK ipc-utils 1.0-2 OK less 551-1 OK libargp 20110921-3 OK libattr1 2.4.48-2 OK libblkid1 2.33.1-2 OK libbz2_1 1.0.8-1 OK libcbor 0.5.0-1 OK libcom_err2 1.44.5-1 OK libcrypt0 2.1-1 OK libcrypt2 4.4.4-1 OK libedit0 20130712-1 OK libfdisk1 2.33.1-2 OK libffi6 3.2.1-2 OK libfido2 1.3.0-2 OK libgcc1 9.3.0-2 OK libgdbm4 1.13-1 OK libgmp10 6.2.0-2 OK libgnutls28 3.3.27-1 OK libgnutls30 3.6.9-1 OK libgssapi_krb5_2 1.15.2-2 OK libhogweed2 2.7.1-1 OK libhogweed4 3.4.1-1 OK libiconv 1.16-2 OK libiconv2 1.16-2 OK libidn11 1.29-1 OK libidn2_0 2.2.0-1 OK libintl8 0.19.8.1-2 OK libk5crypto3 1.15.2-2 OK libkrb5_3 1.15.2-2 OK libkrb5support0 1.15.2-2 OK liblzma5 5.2.4-1 OK libmpfr4 3.1.5-1p10 OK libmpfr6 4.1.0-1 OK libncursesw10 6.1-1.20190727 OK libnettle4 2.7.1-1 OK libnettle6 3.4.1-1 OK libopenssl100 1.0.2o-1 OK libp11-kit0 0.23.20-1 OK libpcre1 8.44-1 OK libpipeline1 1.5.1-1 OK libpopt-common 1.16-2 OK libpopt0 1.16-2 OK libprocps-ng5 3.3.11-1 OK libpsl5 0.21.0-1 OK libreadline7 7.0.3-3 OK libsigsegv2 2.10-2 OK libsmartcols1 2.33.1-2 OK libssl1.1 1.1.1f-1 OK libssp0 6.4.0-1 OK libstdc++6 9.3.0-2 OK libtasn1_6 4.14-1 OK libunistring2 0.9.10-1 OK libuuid1 2.33.1-2 OK libwrap0 7.6-22 OK login 1.13-1 OK man-db 2.7.6.1-1 OK mintty 3.3.0-1 OK nano 2.9.7-1 OK ncurses 6.1-1.20190727 OK openssh 8.3p1-1 OK openssl 1.1.1f-1 OK p11-kit 0.23.20-1 OK p11-kit-trust 0.23.20-1 OK procps-ng 3.3.11-1 OK publicsuffix-list-dafsa 20200326-1 OK rebase 4.4.4-1 OK run 1.3.4-2 OK sed 4.4-1 OK tar 1.29-1 OK terminfo 6.1-1.20190727 OK terminfo-extra 6.1-1.20190727 OK tzcode 2020a-1 OK tzdata 2020a-1 OK util-linux 2.33.1-2 OK vim 7.4.2367-1 OK vim-common 7.4.2367-1 OK vim-minimal 8.2.0486-1 OK wget 1.19.1-2 OK which 2.20-2 OK xxd 7.4.2367-1 OK xz 5.2.4-1 OK zlib0 1.2.11-1 OK Use -h to see help about each section
-- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple