lkml.org 
[lkml]   [1998]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Serious flaw in glibc ?
Date
In article <m0zSPSN-0007U9C@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
>The glibc method is buggy. If ls rewinds my tapes even as root its bad
>dangerous and unexpected behaviour. I hope someone will fix glibc to at
>least do
>
> stat
> if(directory)
> {
> open
> fstat
>
>Otherwise consider what happens backing up /dev to tape...

Yes, ugly. However, the other alternative (that doesn't work with some
2.1.x kernels, but they are broken, so you can just blame the kernel in
that case) is to just append a '/' to the end of the name. That way the
kernel will not allow you to open the file unless it's a directory.

Finally, I should probably just add a "opendir()" system call. That way
I could return EISDIR for normal open() calls some day in the future
when we can drop the old binary support. Consider it done.

Linus

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

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.062 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site