Date: Fri, 22 Jul 2011 12:26:06 +0400 From: Vasiliy Kulikov <segoon@...nwall.com> To: musl@...ts.openwall.com Subject: Re: some fixes to musl 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.