|
|
Log in / Subscribe / Register

Filesystems and case-insensitivity

Filesystems and case-insensitivity

Posted Nov 28, 2018 17:38 UTC (Wed) by dgm (subscriber, #49227)
Parent article: Filesystems and case-insensitivity

> Supporting case-insensitive file names requires the encoding-awareness changes in order to define what case folding means for a given character.

Does it? Why can't you use an attribute to store the case-folded name? Or use the case-folded name as the file name and add a name-as-provided attribute? This way you can move case interpretation to user space, where it belongs.

What I'm missing?


to post comments

Filesystems and case-insensitivity

Posted Nov 29, 2018 12:15 UTC (Thu) by alonz (subscriber, #815) [Link] (4 responses)

>  use the case-folded name as the file name and add a name-as-provided attribute

This actually looks like one of the sanest proposals – I really wonder why the existing user-space solutions are not using this scheme.

Filesystems and case-insensitivity

Posted Nov 29, 2018 12:43 UTC (Thu) by smurf (subscriber, #17840) [Link] (1 responses)

They were written before random user-specified attributes were a thing, much less one you could rely on to be present (more or less). Even today you can easily create file systems without xattr support.

Filesystems and case-insensitivity

Posted Nov 29, 2018 15:11 UTC (Thu) by alonz (subscriber, #815) [Link]

Since kernel support for case insensitivity is currently even less if a thing, I still wonder...

(I may be tempted to write a PoC of this idea and see how it performs, just for curiosity's sake)

Filesystems and case-insensitivity

Posted Nov 29, 2018 15:57 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (1 responses)

I guess name-as-provided is for displaying in user interface?

% getfattr --name=user.name-as-provided malware.sh 
# file: malware.sh
user.name-as-provided="Safe.pdf"

Filesystems and case-insensitivity

Posted Nov 29, 2018 18:34 UTC (Thu) by smurf (subscriber, #17840) [Link]

Well, that's easy enough to fix – verify that the xattr matches the filename before using it.

A non-malicious source of the same problem is somebody renaming the file with an old non-extended-filename-compatible tool (or libc).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds