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]

[Patch]: NUL and other special names


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.

Pierre

2004-05-31  Pierre Humblet <pierre.humblet@ieee.org>

	* winsup.h: Declare DIM macro.
	(find_in_list): Declare function.
	* miscfunc.c (find_in_list): New function.
	* path.cc (is_special_name): New function.
	(path_conv::check): Call is_special_name.

Attachment: special.diff
Description: Text document


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