Subject: uid & gid in sftp

From: "Joseph Galbraith" <[email-masked]>
Date: Fri, 9 Nov 2001 13:59:32 -0700

Currently sftp specifies uid and gid as
a uint32.  Unfortunately, this is an overly
simplistic view of the world.  (Well, at
least my world.)

NT uses arbitrary length numbers as it's
user identifiers.

I would like to proposed that we introduce
the following in the next version of the
sftp draft:

string identifier

where identifier is an opaque representation
of a user or group.

A unix implementation would probably
send:

  uint32 4
  uint32 uid

for example.  I could send something that
WinNT could grok.

This has some problems still -- the client
needs some way to find out what the opaque
identifier is for a given user.

However, really, the protocol already has
this problem.  The UID / GID as they stand
aren't really very useful, because that might
not (probably aren't) correct on the client
system.  

To address this, I think we should look at
Simon's sftp extension:

http://www.tartarus.org/~simon/ssh/draft-sftp-userdb-00.txt

or some other extension that will allow the
client to convert from identifiers to something
suitable for display to the user and from
displayable names back to something suitable
for setstat / open / mkdir.

Also, and extension like this would allow us
to get rid of the longname format in the names
structure, which can add several hundred percent
overhead, depending on the length of the filename.
(Which can be significant in a directory with several
hundred files in it over a slow link.)

- Joseph