[Patch] Encode invalid chars in /proc/registry entries

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Fri Nov 16 13:40:00 GMT 2007

On Fri, Nov 16, 2007 at 12:09:01PM +0100, Corinna Vinschen wrote:
>Hi Christian,
>On Nov 15 22:56, Christian Franke wrote:
>> Registry key and value names may contain chars which are not allowed within 
>> file names ('/', '\', ":"). But Cygwin's /proc/registry returns these names 
>> unchanged to the app. The obvious effect is that such entries cannot be 
>> accessed.
>> But if an entry name is identical to an existing path, more interesting 
>> results occur. Cygwin itself adds registry entries which are testcases for 
>> this issue :-))
>> [...]
>> The attached patch encodes the critical chars with %XX to avoid such 
>> problems.
>> Patch is tested with 1.5.24-2. Merge with HEAD looks good, but was not 
>> actually tested. Therefore, no changelog provided yet.
>Thanks for this patch.  Apart from the missing ChangeLog I'm inclined
>to apply it to the upcoming 1.5.25 release, but I don't like to have it
>in HEAD as is.

I'm not so sure it's appropriate for either yet.

Isn't it possible to use at least some of the managed mode functions
which deal with munging characters to do some of encoding?  It seems
like the patch duplicates some of the functionality from path.cc.

I realize that the registry is sort of the opposite of a managed mount
but it seems like the encoding functions might be potentially used in
reverse for this.


More information about the Cygwin-patches mailing list