Re: [patch 7/8] fdmap v2 - implement sys_socket2
From: dean gaudet
Date: Sun Jun 10 2007 - 00:45:35 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/