Re: [PATCH] Sanitize filesystem NLS handling

From: Alexander E. Patrakov
Date: Mon Mar 19 2007 - 01:50:10 EST


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.


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).

--
Alexander E. Patrakov
-
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/