> At least gets() is rarely used in
> free software, although probably not as rarely as seekdir()/telldir(),
> which I've never even heard of anyone using.
Samba uses it... http://www.vnode.ch/fixing_seekdir
Mind you, I wouldn't have known Samba was using it either (and in fact it took me a little
while to wrap my head around why) before I saw that article.
Posted May 19, 2008 19:55 UTC (Mon) by nix (subscriber, #2304)
[Link]
So a really quite substantial bug (affecting perhaps 3% of all calls to
this function in nontrivial directories) persisted for *a quarter of a
century* before anyone noticed it.
I suspect that seekdir()/telldir() has exactly one user: Samba. Given how
horrible it makes filesystem implementations, and the closeness of Samba
implementors to the kernel, I'm not sure that it's worth preserving this
function for that one user (which is privileged in any case so the usual
oops-it-might-use-up-too-much-memory arguments against a naive
entirely-in-VFS implementation do not apply).
Votes to make seekdir()/telldir() root-only, anyone?