This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: NUL and other special names


On Mon, May 31, 2004 at 06:46:11PM -0400, Pierre A. Humblet wrote:
>This patch prevents NtCreateFile from creating files with special
>names such as NUL.
>Because this needs to be checked very often, I tried to code it
>efficiently with a binary search (it can perhaps be reused elsewhere). 
>
>The new function is_special_name() overlaps with special_name(),
>although there are small differences (it was designed from tests
>on XP Home Ed). Perhaps these two can be merged one day.

Haven't we already done a "GetFileAttributes" on the path by the time
it reaches the NtCreateFile?  If so, couldn't we just avoid trying to
create a file which has "bad" attributes?

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]