delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/03/08/10:39:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=y7nmgB7vsdbhizndg+37m3KNeew59e1KXu0SEubDy/W
xXsPd1sNI7zSZUR00w9oVBq5o89K6Q+kD04UDxWoUP8IwTG6w03IYzlkwoak8mtx
CyoZb9lVdywT1jn7+1Mz79cxcv3o5/4g24B5dfW2J5KMMjTbO+7PAPlN2tG/6csc
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=Y0AFUiHETqprfx45hX1VN6RRSLc=; b=DQ8fWhUETO5edzlVE
RTSAa0f82PwsjZ/O6MjFx8uNCFc3dzhqlMpz6Uxmmexdy2Nd8v5ngJosXh31ZmQJ
gmU5X6QnWUWpoPu/79HRGwiEZKUj19svPaR9m1Z/s3XGEVyV7AKfCZVFa7CwEjGV
AEBsjKnMoaEaxTcCpvkmz/gkpE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: conssluserg-05.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x28Fd1uv010073
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1552059542; bh=niWgqwmJCpA1d59QjuWS0dzt+OEOCMd/9qP5brUxah8=; h=Date:From:To:Subject:In-Reply-To:References:From; b=pYYuvoaMfwKnCvJb9j1TuisxNzw6RinXdHOZhDW/C0eWntUYUjHtRyglBErANcee/ Hqd0H8TMz8yrRDf3G7Oi4n8D4yHonvdtgQlxMtWJhSVXagV6P4i+MrI4J+y+riRRqg sL8y1Btr6cPOxAPSbAtLaf5CBocdiO7Jmk4829Qip2xC4O4N7JjDxO03dDT/oep0qX RcmY1DOoMMx3Gc21pKNbn1uYe3+KzqqnzLbod2lFHAtdwhjmUrvQWI1Q8huYqM0UVH VM9UOW/HbQeSQnAE6L9pyEHLYSfjoIQLm+m43XECdItncC1V5w92H4EUHB9S5OLg0b UZr6+8VYH0PgQ==
Date: Sat, 9 Mar 2019 00:39:08 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: Logging-in using ssh elevates the user privilege.
Message-Id: <20190309003908.52b91dd113d07f9ee1025d4c@nifty.ne.jp>
In-Reply-To: <20190308141118.GM3785@calimero.vinschen.de>
References: <20190307010000 DOT fc28b73739c2dd66e609982b AT nifty DOT ne DOT jp> <381052629 DOT 20190307141955 AT yandex DOT ru> <51233666 DOT 20190307182445 AT yandex DOT ru> <20190308230138 DOT b7f6b5ac90c9a14cde2647c1 AT nifty DOT ne DOT jp> <20190308141118 DOT GM3785 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
X-IsSubscribed: yes

Hi Corinna,

On Fri, 8 Mar 2019 15:11:18 +0100 Corinna Vinschen wrote:
>   setsockopt (sock, SOL_SOCKET, SO_PEERCRED, NULL, 0);
> before calling accept or connect.

I added this to the test code but it failed as:

Server: Created.
Server: Binded.
Server: Listened.
Client: Created.
Client: Connected.
Client: Written.
accept: Software caused connection abort

Of course, setsockopt() was added also before connect().

So, I moved the setsockopt() from just before accept()
to just before listen(), then it  succeeded.

Server: Created.
Server: Binded.
Server: Listened.
Client: Created.
Client: Connected.
Client: Written.
Server: Accepted.
10: 1234567890
Server: Read.

Does this affect to listen() as well?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019