From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120805 invoked by alias); 8 Mar 2019 15:39:23 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 120785 invoked by uid 89); 8 Mar 2019 15:39:22 -0000 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 Received: from conssluserg-05.nifty.com (HELO conssluserg-05.nifty.com) (210.131.2.90) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Mar 2019 15:39:20 +0000 Received: from Express5800-S70 (ntsitm424054.sitm.nt.ngn.ppp.infoweb.ne.jp [219.97.74.54]) (authenticated) by conssluserg-05.nifty.com with ESMTP id x28Fd1uv010073 for ; Sat, 9 Mar 2019 00:39:02 +0900 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: Fri, 08 Mar 2019 15:39:00 -0000 From: Takashi Yano To: cygwin@cygwin.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.fc28b73739c2dd66e609982b@nifty.ne.jp> <381052629.20190307141955@yandex.ru> <51233666.20190307182445@yandex.ru> <20190308230138.b7f6b5ac90c9a14cde2647c1@nifty.ne.jp> <20190308141118.GM3785@calimero.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00170.txt.bz2 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 -- 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