Re: [PATCH] Add CONFIG_VFAT_NO_CREATE_WITH_LONGNAMES option

OGAWA Hirofumi
2009-05-02T11:03:26Z

tridge@samba.org writes:

> OGAWA Hirofumi writes:
> > Um.., probably, this patch would be handle the invalid chars for 8.3 alias.
> > Otherwise, it'll try to create ~<num> postfix, and I guess it'll become
> > the dcache problem.
>
> Do you think that will cause problems?

Yes. E.g. "test=.txt" will replace with "test_.txt" or such. But, dcache
still has "test=.txt". It means "test=.txt" would disappear with memory
pressure.

> If it will, then we could add something like this after the
> vfat_create_shortname() call:
>
> if (strncasecmp(name, msdos_name, MSDOS_NAME) != 0) {
> err = -EINVAL;
> goto out_free;
> }
>
> or would the potential case change still be a problem?

It may be ok. However, of course, it should consider other than
ascii. Well, I think the patch should be allow only perfect 8.3 name in
vfat_create_shortname(). (i.e. is_shortname && base/ext_info.valid)

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>