Re: [PATCH] Sanitize filesystem NLS handling

From: OGAWA Hirofumi
Date: Mon Mar 19 2007 - 10:26:31 EST


"Alexander E. Patrakov" <patrakov@xxxxxxxxxx> writes:

> OGAWA Hirofumi wrote:
>
>> I don't care about "read", because it doesn't corrupt filesystem. I care
>> about only "write", because it can corrupt filesystem.
>>
>> If it's read-only, I'll not care at all, and will agree.
>
> Here you are right, but please tell RedHat about this (and you'll be at
> least called an old-fashioned person). They (and from their initiative,
> almost everyone else) use UTF-8 based locales by default, and ONLY utf8 NLS
> gives correct characters in filenames in this case.
>
> Besides, FS corruption is possible only if the user intentionally writes two
> files with names differing only in their case.

No, the utf8 support of vfat is wrong. This is implementation
thing, and it is not recommended until it is fixed.

>> All are user policy. The users can switch locale and
>> G_FILENAME_ENCODING and something else, some app can switch it even
>> runtime, and I think kernel shouldn't have user policy, right?
>
> G_FILENAME_ENCODING is a Glib2-only heresy, please ignore it. The "ls" tool
> always assumes that file names are in the same encoding as the output of
> "locale charmap" command. The fact that the filenames (contrary to what
> Glib2 developers say) should be in the locale encoding becomes very obvious
> if one reads POSIX specifications for tar and cpio programs (otherwise, they
> won't talk about conversion errors).

I'm talking about two filesystems on a system here, not two encoding
on one filesystem. You can change locale on each filesystems, or each
directory, of course if it's not vfat.

It's wrong? May or may not be true. It's the user policy.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/