mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: musl@lists.openwall.com
Subject: Re: some fixes to musl
Date: Fri, 22 Jul 2011 12:26:06 +0400	[thread overview]
Message-ID: <20110722082605.GB3593@albatros> (raw)
In-Reply-To: <20110722043021.GE132@brightrain.aerifal.cx>

On Fri, Jul 22, 2011 at 00:30 -0400, Rich Felker wrote:
> 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.

Looks like it fixes the problem with *expected* dup2() failures.
However, I'm still worried about theoretical (*m) leaking...

-- 
Vasiliy


      reply	other threads:[~2011-07-22  8:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 17:02 Vasiliy Kulikov
2011-07-21 18:21 ` Rich Felker
2011-07-21 19:00   ` Solar Designer
2011-07-22  8:19     ` Vasiliy Kulikov
2011-07-22 13:30       ` Rich Felker
2011-07-21 19:17   ` Vasiliy Kulikov
2011-07-22  2:08     ` Rich Felker
2011-07-24  9:39       ` Vasiliy Kulikov
2011-07-24 12:56         ` Rich Felker
2011-07-24 18:38           ` Vasiliy Kulikov
2011-07-24  9:19   ` close(2) failure cases (was: some fixes to musl) Vasiliy Kulikov
2011-07-24 12:24     ` Rich Felker
2011-07-24 17:49       ` Vasiliy Kulikov
2011-07-24 22:29         ` Rich Felker
2011-07-25 17:36           ` Vasiliy Kulikov
2011-07-22  1:57 ` some fixes to musl Rich Felker
2011-07-22  4:30   ` Rich Felker
2011-07-22  8:26     ` Vasiliy Kulikov [this message]

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=20110722082605.GB3593@albatros \
    --to=segoon@openwall.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).