lkml.org 
[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 9 Jun 2007 21:45:09 -0700 (PDT)
Fromdean gaudet <>
SubjectRe: [patch 7/8] fdmap v2 - implement sys_socket2
On Sat, 9 Jun 2007, Linus Torvalds wrote:

> IOW, the most common case for libraries is not that they get invoced to do 
> one thing, but that they get loaded and then used over and over and over 
> again, and the _reason_ for wanting to have a file descriptor open may 
> well be that the library wants to cache the file descriptor, rather than 
> having to open a file over and over again!

for an example of a library wanting to cache an open fd ... and failing 
miserably at protecting itself from the application closing its fd read:

http://bugzilla.padl.com/show_bug.cgi?id=304
http://bugzilla.padl.com/show_bug.cgi?id=305

basically libnss-ldap is trying to use getsockname/getpeername to prove 
that an fd belongs to it.  the failure modes are quite delightful.

-dean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-10 04:47    [from the cache]
©2003-2008