From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/190 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: some fixes to musl Date: Fri, 22 Jul 2011 00:30:21 -0400 Message-ID: <20110722043021.GE132@brightrain.aerifal.cx> References: <20110721170255.GA7352@albatros> <20110722015739.GC132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1311309655 31272 80.91.229.12 (22 Jul 2011 04:40:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2011 04:40:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-274-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jul 22 06:40:51 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qk7Xf-000485-Hn for gllmg-musl@lo.gmane.org; Fri, 22 Jul 2011 06:40:51 +0200 Original-Received: (qmail 7368 invoked by uid 550); 22 Jul 2011 04:40:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7356 invoked from network); 22 Jul 2011 04:40:50 -0000 Content-Disposition: inline In-Reply-To: <20110722015739.GC132@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:190 Archived-At: On Thu, Jul 21, 2011 at 09:57:39PM -0400, Rich Felker wrote: > > forkpty(): > > - It should be guaranteed that master fd is closed, tty is setup, slave > > fd is dup'ed to 1,2,3. The latter can be broken by setting small > > rlimit. setsid() is checked for company :) I think the only way to > > handle the failure is _exit(). While it may be not the best choise, > > however, continuing the work with half dropped privileges is more > > dangerous. > > > > openpty(): > > - close() shouldn't change errno updated by failed ioctl()/open(). > > - I suppose the last calls to tcsetattr() and ioctl() may fail too. > > Going to try to find a good solution for these... I believe I've fixed forkpty's issue with fd exhaustion. Please tell me if anything seems wrong. Rich