lkml.org 
[lkml]   [1999]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] File flags handling - proposal for API.
Hi,

how will such a 'directory which can be opened as file' behave compared to
2.0?

If a simple

fp = open(<directory>, O_RDONLY)

opens a default-file in <directory> instead of <directory> itself, then we
have (at least compared to 2.0) a rather subtile change which may implies
some severe security problems.

At least in 2.0, you may open a directory and use the filehanlde you got later
with fstat, fchown, fchmod. It would be rather bad if this will change.

First you may need this to manipulate directories in a secure way.
Second, most unixes will not have this "directory as file"-feature which means
that a lot of application will not be prepared to handle it correct.

Even if a directory must be marked with a flag, the security problem is still
there.

May I misunterstood this thread, in this case forget this mail and pardon me.
If I didn't, I'm real curious how one will handle this case.

Greetings

Wolfgang Walter

--
Veni, Vidi, VISA:
I came, I saw, I did a little shopping.


-
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:52    [from the cache]
©2003-2011 Jasper Spaans