Re: [Patch]: NUL and other special names

2004-06-03 Thread Christopher Faylor
On Thu, Jun 03, 2004 at 06:14:58PM -0400, Christopher Faylor wrote: >On Thu, Jun 03, 2004 at 04:35:00PM -0400, Christopher Faylor wrote: >>On Thu, Jun 03, 2004 at 03:53:40PM -0400, David Fritz wrote: >>>I don't how much you want to rely on undocumented features, but ntdll.dll >>>exports a function

Re: [Patch]: NUL and other special names

2004-06-03 Thread Christopher Faylor
On Thu, Jun 03, 2004 at 04:35:00PM -0400, Christopher Faylor wrote: >On Thu, Jun 03, 2004 at 03:53:40PM -0400, David Fritz wrote: >>I don't how much you want to rely on undocumented features, but ntdll.dll >>exports a function called RtlIsDosDeviceName_U(). The WINE implementation >>has the foll

Re: [Patch]: NUL and other special names

2004-06-03 Thread Christopher Faylor
On Thu, Jun 03, 2004 at 05:26:45PM -0400, Pierre A. Humblet wrote: > > >Christopher Faylor wrote: >> >> On Thu, Jun 03, 2004 at 04:55:05PM -0400, Pierre A. Humblet wrote: >> >>I believe that whenever I try to limit COM to single digits someone >> >>complains about their special board with 527 com

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
David Fritz wrote: > > I don't think the logic implemented by RtlIsDosDeviceName_U() is all that > different from the logic in the patch. Which is to say, it seems to use a > hard-coded list of names and does not actually check for existing devices. Do > we want to block all names that could b

Re: [Patch]: NUL and other special names

2004-06-03 Thread David Fritz
I don't think the logic implemented by RtlIsDosDeviceName_U() is all that different from the logic in the patch. Which is to say, it seems to use a hard-coded list of names and does not actually check for existing devices. Do we want to block all names that could be DOS devices or just the nam

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
"Pierre A. Humblet" wrote: > > Christopher Faylor wrote: > > > > On Thu, Jun 03, 2004 at 04:55:05PM -0400, Pierre A. Humblet wrote: > > >>I believe that whenever I try to limit COM to single digits someone > > >>complains about their special board with 527 com ports or something. > > > > > >That

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
Christopher Faylor wrote: > > On Thu, Jun 03, 2004 at 04:55:05PM -0400, Pierre A. Humblet wrote: > >>I believe that whenever I try to limit COM to single digits someone > >>complains about their special board with 527 com ports or something. > > > >That's another issue. COM12 is not a DOS devic

Re: [Patch]: NUL and other special names

2004-06-03 Thread Christopher Faylor
On Thu, Jun 03, 2004 at 04:55:05PM -0400, Pierre A. Humblet wrote: >>I believe that whenever I try to limit COM to single digits someone >>complains about their special board with 527 com ports or something. > >That's another issue. COM12 is not a DOS device (on NT), but it can be >the basename of

Re: [Patch]: NUL and other special names

2004-06-03 Thread David Fritz
Pierre A. Humblet wrote: [...] Does it handle conin$, conout$ and clocks$ ? It would appear that it does not (under Win2k SP4): 0x foo 0x0006 con 0x0006 nul 0x0006 prn 0x0008 lpt1 0x lpt16 0x0008 com1 0x com16 0x conin$ 0x conout

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
Igor Pechtchanski wrote: > > On Thu, 3 Jun 2004, Pierre A. Humblet wrote: > > > David Fritz wrote: > > > > [snip] > > > Also, from the patch: > > > > > > /* COM and LPT must be followed by a single digit */ > > > > > > The code in src/winsup/cygwin/devices.cc would seem to indicate th

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
Christopher Faylor wrote: > > On Thu, Jun 03, 2004 at 03:53:40PM -0400, David Fritz wrote: > >I don't how much you want to rely on undocumented features, but ntdll.dll > >exports a function called RtlIsDosDeviceName_U(). The WINE implementation > >has the following to say about it: > > > > > >/

Re: [Patch]: NUL and other special names

2004-06-03 Thread Christopher Faylor
On Thu, Jun 03, 2004 at 03:53:40PM -0400, David Fritz wrote: >I don't how much you want to rely on undocumented features, but ntdll.dll >exports a function called RtlIsDosDeviceName_U(). The WINE implementation >has the following to say about it: > > >/***

Re: [Patch]: NUL and other special names

2004-06-03 Thread Igor Pechtchanski
On Thu, 3 Jun 2004, Pierre A. Humblet wrote: > David Fritz wrote: > > [snip] > > Also, from the patch: > > > > /* COM and LPT must be followed by a single digit */ > > > > The code in src/winsup/cygwin/devices.cc would seem to indicate that > > the number is not limited to a single digit

Re: [Patch]: NUL and other special names

2004-06-03 Thread Pierre A. Humblet
David Fritz wrote: > > I don't how much you want to rely on undocumented features, but ntdll.dll > exports a function called RtlIsDosDeviceName_U(). The WINE implementation has > the following to say about it: > > /*** > *

Re: [Patch]: NUL and other special names

2004-06-03 Thread David Fritz
I don't how much you want to rely on undocumented features, but ntdll.dll exports a function called RtlIsDosDeviceName_U(). The WINE implementation has the following to say about it: /*** * RtlIsDosDeviceName_U (

Re: [Patch]: NUL and other special names

2004-06-02 Thread David Fritz
Christopher Faylor wrote: On Wed, Jun 02, 2004 at 05:16:36PM -0400, David Fritz wrote: Christopher Faylor wrote: I keep thinking that there is a layer of translation that we're missing here and we should be somehow using an enumeration that the OS provides rather than coming up with our own table.

Re: [Patch]: NUL and other special names

2004-06-02 Thread Christopher Faylor
On Wed, Jun 02, 2004 at 05:16:36PM -0400, David Fritz wrote: >Christopher Faylor wrote: >>I keep thinking that there is a layer of translation that we're missing >>here and we should be somehow using an enumeration that the OS provides >>rather than coming up with our own table. > >NtQueryAttribute

Re: [Patch]: NUL and other special names

2004-06-02 Thread David Fritz
Christopher Faylor wrote: On Tue, Jun 01, 2004 at 06:11:55PM -0400, Pierre A. Humblet wrote: Christopher Faylor wrote: 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 che

Re: [Patch]: NUL and other special names

2004-06-01 Thread Christopher Faylor
On Tue, Jun 01, 2004 at 06:11:55PM -0400, Pierre A. Humblet wrote: > >Christopher Faylor wrote: >> >> 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

Re: [Patch]: NUL and other special names

2004-06-01 Thread Pierre A. Humblet
Christopher Faylor wrote: > > 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 ca

Re: [Patch]: NUL and other special names

2004-06-01 Thread Christopher Faylor
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

[Patch]: NUL and other special names

2004-05-31 Thread Pierre A. Humblet
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 the