Subject: Re: [nfsv4] Stringprep Compares

From: Jim Rees <[email-masked]>
Date: Wed, 16 Mar 2005 15:33:56 -0500

a) specify a normalization form
  b) specify a way to negotiate the use of currently unassigned code
     points (so NFSv4 can use them when they are assigned)
  c) specify that the client is responsible for applying stringprep, while
     the server is responsible for verifying that the UTF-8 strings sent
     by the client are consistent with the required stringprep profile,
     but only on CREATEs -- the latter requires less computation and,
     possibly storage and would be avoided in most situations.

a) is absolutely essential and should be done asap.

c) might be meddling in implementation details.  Isn't it sufficient to
specify the character set (unicode) and normalization on the wire?  For
example, if a server is sharing its file store with other applications (as
is the case with the linux server) it may find some invalid file names on
disk even though it carefully checked all the names on creat.  So it may
want to do some validation or stringprep on readdir.

I suspect most clients and servers today do no validation or stringprep on
any names.  For the BSDs and maybe even for linux it isn't really defined
what the character set is either on disk or at the syscall interface.

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nfsv4

---

From: Nicolas Williams <[email-masked]>
Date: Wed, 16 Mar 2005 14:54:38 -0600

On Wed, Mar 16, 2005 at 03:33:56PM -0500, Jim Rees wrote:
> c) might be meddling in implementation details.

See below.

>                                                  Isn't it sufficient to
> specify the character set (unicode) and normalization on the wire?

Yes.  For brand-new filesystems not accessed in any way other than
through NFSv4 this is the same as saying what I said in (c).

That is, clients MUST send stringprepped file names and servers MUST NOT
accept non-stringprepped names from clients.

Whether the spec should also say that the server MUST NOT send
non-stringprepped names is another story, but servers certainly MUST NOT
send non-UTF-8 names to clients.

>                                                                     For

Saying anything about that in the spec would be meddling in
implementation details.  Consider two alternatives, among others,
available to the implementor: store stringprepped UTF-8 names on disk
and stringprep all creats from the local apps, not just from NFSv4
clients, OR stringprep on READDIRs.

> what the character set is either on disk or at the syscall interface.

Implementation details.

Nico
--