fat32 interoperatibility issue

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

fat32 interoperatibility issue

Daniel Gracia
Hit an interoperatibility issue today:

fat32 stack on OBSD would allow to create illegal file entries for
Micro$oft machines, like:

CON
PRN
AUX
CLOCK$
NUL
COM1
COM2
COM3
COM4
COM5
COM6
COM7
COM8
COM9
LPT1
LPT2
LPT3
LPT4
LPT5
LPT6
LPT7
LPT8
LPT9

and with illegal chars like '?'.

Is this on purpose, or do you feel like applying a patch to throw an
error on these cases?

This is naive so I don't care much, but someone else may get bitten in
the future. Would hack on it if desired.

Beers!

Reply | Threaded
Open this post in threaded view
|

Re: fat32 interoperatibility issue

Tomas Bodzar
Seems similar to this (very old) explanation

http://heirloom.sourceforge.net/mailx_aux_c.html

On Mon, Aug 1, 2011 at 1:09 PM, Daniel Gracia
<[hidden email]> wrote:

> Hit an interoperatibility issue today:
>
> fat32 stack on OBSD would allow to create illegal file entries for Micro$oft
> machines, like:
>
> CON
> PRN
> AUX
> CLOCK$
> NUL
> COM1
> COM2
> COM3
> COM4
> COM5
> COM6
> COM7
> COM8
> COM9
> LPT1
> LPT2
> LPT3
> LPT4
> LPT5
> LPT6
> LPT7
> LPT8
> LPT9
>
> and with illegal chars like '?'.
>
> Is this on purpose, or do you feel like applying a patch to throw an error
> on these cases?
>
> This is naive so I don't care much, but someone else may get bitten in the
> future. Would hack on it if desired.
>
> Beers!

Reply | Threaded
Open this post in threaded view
|

Re: fat32 interoperatibility issue

Daniel Gracia
Yep! That's it, and I totally agree with the discusion there but, as far
as msdosfs is in OpenBSD for the very reason of portability -and now I'm
supposing-, I wonder if this would be an any welcomed patch.

Anyway, I'm not dying for it... It's working as is for me :D

El 01/08/2011 14:08, Tomas Bodzar escribiC3:

> Seems similar to this (very old) explanation
>
> http://heirloom.sourceforge.net/mailx_aux_c.html
>
> On Mon, Aug 1, 2011 at 1:09 PM, Daniel Gracia
> <[hidden email]>  wrote:
>> Hit an interoperatibility issue today:
>>
>> fat32 stack on OBSD would allow to create illegal file entries for Micro$oft
>> machines, like:
>>
>> CON
>> PRN
>> AUX
>> CLOCK$
>> NUL
>> COM1
>> COM2
>> COM3
>> COM4
>> COM5
>> COM6
>> COM7
>> COM8
>> COM9
>> LPT1
>> LPT2
>> LPT3
>> LPT4
>> LPT5
>> LPT6
>> LPT7
>> LPT8
>> LPT9
>>
>> and with illegal chars like '?'.
>>
>> Is this on purpose, or do you feel like applying a patch to throw an error
>> on these cases?
>>
>> This is naive so I don't care much, but someone else may get bitten in the
>> future. Would hack on it if desired.
>>
>> Beers!

Reply | Threaded
Open this post in threaded view
|

Re: fat32 interoperatibility issue

Patrick Lamaiziere
Le Mon, 01 Aug 2011 16:04:08 +0200,
Daniel Gracia <[hidden email]> a icrit :

> Yep! That's it, and I totally agree with the discusion there but, as
> far as msdosfs is in OpenBSD for the very reason of portability -and
> now I'm supposing-, I wonder if this would be an any welcomed patch.

Well Windows itself allows to create such files, so this is portable.
But on Windows they are hidden by the explorer, this is (was?) used by
some badwares to hide files (like hidden ftp server)

See
http://www.gohacking.com/2008/02/how-to-create-con-folder-in-windows.html

I'm not sure if this is still true.

Regards.

Reply | Threaded
Open this post in threaded view
|

Re: fat32 interoperatibility issue

David Walker
In reply to this post by Daniel Gracia
Daniel Gracia <lists.dani () electronicagracia ! com> wrote:

This is more accurate than the thread title:

> fat32 stack on OBSD would allow to create illegal file entries for
> Micro$oft machines, like:

The naming of special devices is abstracted a little higher in the food chain:
http://msdn.microsoft.com/en-us/library/aa365247.aspx#namespaces

> Is this on purpose, or do you feel like applying a patch to throw an
> error on these cases?

Even if that was desirable how far do you go ...
Read also? Rename? Remove?
How would people examine Windows special device name issues under OpenBSD ...

Extend it to any other naming isues that may arise when mounted under
another operating system ...

Disregarding any patent issues vis-a-vis FAT32 there's no reason not
to use it and leave Windows out of the equation altogether, e.g. I
want to make a file called prn on a FAT32 partition under OpenBSD ...

Best wishes.

Reply | Threaded
Open this post in threaded view
|

Re: fat32 interoperatibility issue

Ted Unangst-2
In reply to this post by Daniel Gracia
On Mon, Aug 01, 2011, Daniel Gracia wrote:
> Hit an interoperatibility issue today:
>
> fat32 stack on OBSD would allow to create illegal file entries for
> Micro$oft machines, like:
>
> CON

> Is this on purpose, or do you feel like applying a patch to throw an
> error on these cases?

The special device names are not illegal in the filesystem.  You can
create such files on Windows, even, if you use UNC paths.  Nothing
broken, nothing to fix.