public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Logging-in using ssh elevates the user privilege.
Date: Fri, 08 Mar 2019 14:11:00 -0000	[thread overview]
Message-ID: <20190308141118.GM3785@calimero.vinschen.de> (raw)
In-Reply-To: <20190308230138.b7f6b5ac90c9a14cde2647c1@nifty.ne.jp>

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

On Mar  8 23:01, Takashi Yano wrote:
> Hello,
> 
> Thank you for the information.
> 
> On Thu, 7 Mar 2019 18:24:45 +0300 Andrey Repin wrote:
> > > GNU screen freeze without much of an effort under Cygwin.
> > > Try detaching from running screen and then running screen -ls.
> > 
> > Past discussion
> > http://sourceware.org/ml/cygwin/2017-05/msg00448.html
> > mid:16810313565.20170527142723@yandex.ru
> 
> I looked into this problem of GNU screen and found the
> cause is very different from that of the problem I had
> reported.
> 
> The problem I had reported is due to the failure of
> sending signal, which is caused by mismatch of tokens
> between ssh session and mintty session.
> 
> On the other hand, the problem you mentioned is due
> to the difference in the behaviour of socket API.
> 
> In Linux, connect() in the client returns befor the
> server calls accept(). However, in cygwin, connect()
> does not return until the server calls accept().

This is a result of the handshake to exchange credentials for
getpeereid().  To workaround this issue, try building screen
with a tweak.  Server and as client should call

  setsockopt (sock, SOL_SOCKET, SO_PEERCRED, NULL, 0);

before calling accept or connect.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-03-08 14:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 16:00 Takashi Yano
2019-03-06 16:15 ` Corinna Vinschen
2019-03-06 16:17   ` Corinna Vinschen
2019-03-07 10:08     ` Takashi Yano
2019-03-06 18:33 ` Achim Gratz
2019-03-07 11:23   ` Takashi Yano
2019-03-07 11:20 ` Andrey Repin
2019-03-07 15:35   ` Andrey Repin
2019-03-08 14:01     ` Takashi Yano
2019-03-08 14:11       ` Corinna Vinschen [this message]
2019-03-08 14:46         ` Takashi Yano
2019-03-08 14:52           ` Corinna Vinschen
2019-03-08 17:57             ` Andrew Schulman
2019-03-08 22:36               ` Takashi Yano
2019-03-08 23:19                 ` Andrew Schulman
2019-03-09  1:49                   ` Takashi Yano
2019-03-09  7:47                     ` Michael Wild
2019-03-08 15:39         ` Takashi Yano
2019-03-08 15:56           ` Corinna Vinschen
2019-03-08 16:21             ` Takashi Yano
2019-03-08 17:14               ` Corinna Vinschen
2019-03-07 11:14 Takashi Yano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190308141118.GM3785@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).