[Mono-list] Incorrect path interpretation(gacutil)

Rafael Teixeira rafael.teixeirabr at terra.com.br
Tue Jan 30 11:21:25 EST 2007


On Sat, 2007-01-27 at 16:30 -0800, monoport wrote:
> Thanks, Rafael.
> Rafael Teixeira-3 wrote:
> > 
> > return (arg [0] == '-' || (arg [0] == '/' &&
> > !arg.EndsWith(".dll") && arg.IndexOf('/', 1) < 0 ) );
> > 
> And here my remarks:
> 1. Standard specifies that String.EndsWith performs a case-sensitive search.
> Therefore assembly with the name
>  assm.DLL won't work, or if an assembly without a .dll extension too.

I forgot the case sensitivity issue, but the last condition helps with
that and accepts anything that is at least one directory deeper than the
root as an assembly name, this will only fail if you are installing
libraries that 'doesn't end with ".dll" (in all-lowercase that is a good
convention to follow on *nix world) and are in the root (/) directory
(that so many conscious admins would not permit, as it is bad from the
security point-of-view).

Nevertheless, I'll submit a patch that handles case-insensitivity for

> 2. The solution as I see is to 
> - remove slash and leave only '-'(not a reliable one if again a relative
> path starts from the '-')
> - or add a special option (e.g. '-a' or '/a' indicating absolute path
> specificator)
> ----
> monoport 

I don't (2) is better than the current patch already committed to the
sources. Just the case-sensitivity bit is still a problem, but I think
that perhaps just the last condition is needed to be able to
differentiate an option from a path.


Rafael Teixeira <rafael.teixeirabr at terra.com.br>

More information about the Mono-list mailing list