[Mono-list] VFAT vs Unix filesystems...

Piers Haken piersh@friskit.com
Wed, 8 Jan 2003 16:38:54 -0800


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2B777.7D23BFA2
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

For strongly named assemblies, such as those in the GAC, isn't the
assembly file name part of the hash? If so then this would imply case
sensitivity, and as long as the file names on unix have the right case
then this won't be a problem. Of course, the problem for weakly named
assemblies still exists...

Piers.

> -----Original Message-----
> From: Simon Waite [mailto:simon@psionics.demon.co.uk]=20
> Sent: Wednesday, January 08, 2003 2:46 PM
> To: Mono List
> Subject: Re: [Mono-list] VFAT vs Unix filesystems...
>=20
>=20
> I maintain the premise that dumbing down the DLL search=20
> method is a "Bad Idea"(tm) - depending on which strategy you=20
> use to lookup MyAssembly.dll.
>=20
> For instance a malicious user could insert MYASSEMBLY.DLL into the=20
> search path, and override the assembly the app is taking. -=20
> Possibly with disasterous concequences.
>=20
> Of course the most likely story is that someone will=20
> accidently have this problem, and spend days figuring it out.=20
> Regardless if you do=20
> dumb down the FS in mono ,leaving it as-is presents a similar=20
> problem it has to be written in the documentation in LARGE LETTERS.
>=20
> As for GAC, I'm not even sure any discussion documents wrt unix=20
> implementations are even about. I know for one, that I'd not=20
> want mono being suid and handling all the assemblies for a cache.
>=20
> The most likely case being is something like a .mono/gac=20
> directory for each user, with a /var/share/mono/gac for=20
> system-wide officially sanctioned assemblies - maybe.
>=20
>=20
> Just my 2p
>=20
> -S
>=20
> ----- Original Message -----=20
> From: "Jonathan Pryor" <jonpryor@vt.edu>
> To: "Pablo Baena" <pbaena@uol.com.ar>
> Cc: "Mono List" <mono-list@ximian.com>
> Sent: Wednesday, January 08, 2003 4:14 PM
> Subject: Re: [Mono-list] VFAT vs Unix filesystems...
>=20
>=20
> > My two cents (since everyone else has already given theirs...)
> >=20
> > Mono should be case-insensitive for all assembly name lookups.
> >=20
> > Why?  Compatibility.  And it makes sense.  Here's why.
> >=20
> > Long term (IIRC) we'll be following .NET.  Which means=20
> we'll have the=20
> > concept of shared assemblies (located in the Global Assembly Cache
> > (GAC)) and non-shared assemblies, located in the same=20
> directory (or a
> > sub-directory) as the executable.
> >=20
> > The GAC stores an assemblies version, locale, public key,=20
> etc., along=20
> > with the assemblies file name.  This allows multiple=20
> different vendors=20
> > to have a shared assembly with the same name (e.g.=20
> > MySharedAssembly.dll) installed at the same time, since the=20
> public key=20
> > *must* be different (different vendors).  Likewise for two=20
> different=20
> > versions of a shared assembly from the same vendor: the=20
> version will=20
> > be different, so you'll have to store multiple copies.
> >=20
> > End result: for shared assemblies, you can't just use=20
> case-sensitive=20
> > name comparisons anyway, since you need to take the version, public=20
> > key, etc. into consideration.  For shared assemblies,=20
> case-insensitive=20
> > name comparisons are the least of our worries, so we can always use=20
> > case-insensitive searches.
> >=20
> > That leaves local/non-shared assemblies.  Since these will=20
> be in the=20
> > application's directory, we could argue that name casing is=20
> > irrelevant, so just use case-sensitive names.  However, when would=20
> > case-sensitive names be important for a single executable? =20
> When you=20
> > have ``Assembly.dll'' and ``assembly.dll'' used by the same=20
> program. =20
> > Unless they're in different sub-directories, this likely=20
> won't operate=20
> > properly under .NET since Windows will only see one of those files,=20
> > not both. Plus, it would be brain-dead/stupid for a developer to do=20
> > that, so I don't see much point in supporting that behavior.
> >=20
> > So, *long-term*, I think case-insensitive searches should be the=20
> > default.  However, before we get there we need to implement GAC=20
> > support and the rest of the assembly-loading algorithms.
> >=20
> > Short term, stick with the current behavior.  We should focus on=20
> > correct long-term behavior instead of worrying about=20
> short-term hacks.
> >=20
> >  - Jon
> >=20
> > On Tue, 2003-01-07 at 20:21, Pablo Baena wrote:
> > > I've noticed that when a .NET assembly is referenced on a program=20
> > > running on Windows, the casing of the assembly name is=20
> ignored, thus=20
> > > when running the compiled program on Unix (or any real OS=20
> :O), Mono=20
> > > will fail to load the assembly if only one character=20
> differs on the=20
> > > case.
> > >=20
> > > Am I clear on this? Just to clarify my stupid english:
> > >=20
> > > I have a Classpath.dll on Windows. I compile the program with:
> > >=20
> > > mcs /r:classpath chachacha.cs
> > >=20
> > > which ends successfully.
> > >=20
> > > Then when I run the prog in Linux, mono fails because it doesn't=20
> > > find classpath.dll, and this is solved renaming the dll,=20
> but this is=20
> > > just annoying.
> > >=20
> > > Fill a bug report I should?
> > >=20
> > > --
> > > Pablo Baena <pbaena@uol.com.ar>
> >=20
> >=20
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@ximian.com=20
> > http://lists.ximian.com/mailman/listinfo/mono-list
>=20
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com=20
> http://lists.ximian.com/mailman/listinfo/mono-list
>=20

------_=_NextPart_001_01C2B777.7D23BFA2
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.4417.0">
<TITLE>RE: [Mono-list] VFAT vs Unix filesystems...</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>For strongly named assemblies, such as those in the =
GAC, isn't the assembly file name part of the hash? If so then this =
would imply case sensitivity, and as long as the file names on unix have =
the right case then this won't be a problem. Of course, the problem for =
weakly named assemblies still exists...</FONT></P>

<P><FONT SIZE=3D2>Piers.</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT>

<BR><FONT SIZE=3D2>&gt; From: Simon Waite [<A =
HREF=3D"mailto:simon@psionics.demon.co.uk">mailto:simon@psionics.demon.co=
.uk</A>] </FONT>

<BR><FONT SIZE=3D2>&gt; Sent: Wednesday, January 08, 2003 2:46 PM</FONT>

<BR><FONT SIZE=3D2>&gt; To: Mono List</FONT>

<BR><FONT SIZE=3D2>&gt; Subject: Re: [Mono-list] VFAT vs Unix =
filesystems...</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; I maintain the premise that dumbing down the DLL =
search </FONT>

<BR><FONT SIZE=3D2>&gt; method is a &quot;Bad Idea&quot;(tm) - depending =
on which strategy you </FONT>

<BR><FONT SIZE=3D2>&gt; use to lookup MyAssembly.dll.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; For instance a malicious user could insert =
MYASSEMBLY.DLL into the </FONT>

<BR><FONT SIZE=3D2>&gt; search path, and override the assembly the app =
is taking. - </FONT>

<BR><FONT SIZE=3D2>&gt; Possibly with disasterous concequences.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Of course the most likely story is that someone =
will </FONT>

<BR><FONT SIZE=3D2>&gt; accidently have this problem, and spend days =
figuring it out. </FONT>

<BR><FONT SIZE=3D2>&gt; Regardless if you do </FONT>

<BR><FONT SIZE=3D2>&gt; dumb down the FS in mono ,leaving it as-is =
presents a similar </FONT>

<BR><FONT SIZE=3D2>&gt; problem it has to be written in the =
documentation in LARGE LETTERS.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; As for GAC, I'm not even sure any discussion =
documents wrt unix </FONT>

<BR><FONT SIZE=3D2>&gt; implementations are even about. I know for one, =
that I'd not </FONT>

<BR><FONT SIZE=3D2>&gt; want mono being suid and handling all the =
assemblies for a cache.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; The most likely case being is something like a =
.mono/gac </FONT>

<BR><FONT SIZE=3D2>&gt; directory for each user, with a =
/var/share/mono/gac for </FONT>

<BR><FONT SIZE=3D2>&gt; system-wide officially sanctioned assemblies - =
maybe.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Just my 2p</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; -S</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; ----- Original Message ----- </FONT>

<BR><FONT SIZE=3D2>&gt; From: &quot;Jonathan Pryor&quot; =
&lt;jonpryor@vt.edu&gt;</FONT>

<BR><FONT SIZE=3D2>&gt; To: &quot;Pablo Baena&quot; =
&lt;pbaena@uol.com.ar&gt;</FONT>

<BR><FONT SIZE=3D2>&gt; Cc: &quot;Mono List&quot; =
&lt;mono-list@ximian.com&gt;</FONT>

<BR><FONT SIZE=3D2>&gt; Sent: Wednesday, January 08, 2003 4:14 PM</FONT>

<BR><FONT SIZE=3D2>&gt; Subject: Re: [Mono-list] VFAT vs Unix =
filesystems...</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; My two cents (since everyone else has =
already given theirs...)</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Mono should be case-insensitive for all =
assembly name lookups.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Why?&nbsp; Compatibility.&nbsp; And it =
makes sense.&nbsp; Here's why.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Long term (IIRC) we'll be following =
.NET.&nbsp; Which means </FONT>

<BR><FONT SIZE=3D2>&gt; we'll have the </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; concept of shared assemblies (located in =
the Global Assembly Cache</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; (GAC)) and non-shared assemblies, located =
in the same </FONT>

<BR><FONT SIZE=3D2>&gt; directory (or a</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; sub-directory) as the executable.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; The GAC stores an assemblies version, =
locale, public key, </FONT>

<BR><FONT SIZE=3D2>&gt; etc., along </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; with the assemblies file name.&nbsp; This =
allows multiple </FONT>

<BR><FONT SIZE=3D2>&gt; different vendors </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; to have a shared assembly with the same =
name (e.g. </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; MySharedAssembly.dll) installed at the same =
time, since the </FONT>

<BR><FONT SIZE=3D2>&gt; public key </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; *must* be different (different =
vendors).&nbsp; Likewise for two </FONT>

<BR><FONT SIZE=3D2>&gt; different </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; versions of a shared assembly from the same =
vendor: the </FONT>

<BR><FONT SIZE=3D2>&gt; version will </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; be different, so you'll have to store =
multiple copies.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; End result: for shared assemblies, you =
can't just use </FONT>

<BR><FONT SIZE=3D2>&gt; case-sensitive </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; name comparisons anyway, since you need to =
take the version, public </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; key, etc. into consideration.&nbsp; For =
shared assemblies, </FONT>

<BR><FONT SIZE=3D2>&gt; case-insensitive </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; name comparisons are the least of our =
worries, so we can always use </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; case-insensitive searches.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; That leaves local/non-shared =
assemblies.&nbsp; Since these will </FONT>

<BR><FONT SIZE=3D2>&gt; be in the </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; application's directory, we could argue =
that name casing is </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; irrelevant, so just use case-sensitive =
names.&nbsp; However, when would </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; case-sensitive names be important for a =
single executable?&nbsp; </FONT>

<BR><FONT SIZE=3D2>&gt; When you </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; have ``Assembly.dll'' and ``assembly.dll'' =
used by the same </FONT>

<BR><FONT SIZE=3D2>&gt; program.&nbsp; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Unless they're in different =
sub-directories, this likely </FONT>

<BR><FONT SIZE=3D2>&gt; won't operate </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; properly under .NET since Windows will only =
see one of those files, </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; not both. Plus, it would be =
brain-dead/stupid for a developer to do </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; that, so I don't see much point in =
supporting that behavior.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; So, *long-term*, I think case-insensitive =
searches should be the </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; default.&nbsp; However, before we get there =
we need to implement GAC </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; support and the rest of the =
assembly-loading algorithms.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Short term, stick with the current =
behavior.&nbsp; We should focus on </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; correct long-term behavior instead of =
worrying about </FONT>

<BR><FONT SIZE=3D2>&gt; short-term hacks.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; - Jon</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; On Tue, 2003-01-07 at 20:21, Pablo Baena =
wrote:</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; I've noticed that when a .NET assembly =
is referenced on a program </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; running on Windows, the casing of the =
assembly name is </FONT>

<BR><FONT SIZE=3D2>&gt; ignored, thus </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; when running the compiled program on =
Unix (or any real OS </FONT>

<BR><FONT SIZE=3D2>&gt; :O), Mono </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; will fail to load the assembly if only =
one character </FONT>

<BR><FONT SIZE=3D2>&gt; differs on the </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; case.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Am I clear on this? Just to clarify my =
stupid english:</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; I have a Classpath.dll on Windows. I =
compile the program with:</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; mcs /r:classpath chachacha.cs</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; which ends successfully.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Then when I run the prog in Linux, =
mono fails because it doesn't </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; find classpath.dll, and this is solved =
renaming the dll, </FONT>

<BR><FONT SIZE=3D2>&gt; but this is </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; just annoying.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Fill a bug report I should?</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; --</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Pablo Baena =
&lt;pbaena@uol.com.ar&gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; =
_______________________________________________</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; Mono-list maillist&nbsp; -&nbsp; =
Mono-list@ximian.com </FONT>

<BR><FONT SIZE=3D2>&gt; &gt; <A =
HREF=3D"http://lists.ximian.com/mailman/listinfo/mono-list">http://lists.=
ximian.com/mailman/listinfo/mono-list</A></FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; =
_______________________________________________</FONT>

<BR><FONT SIZE=3D2>&gt; Mono-list maillist&nbsp; -&nbsp; =
Mono-list@ximian.com </FONT>

<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://lists.ximian.com/mailman/listinfo/mono-list">http://lists.=
ximian.com/mailman/listinfo/mono-list</A></FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2B777.7D23BFA2--