The 9p server gets valid uid, the Linux kernel sends separate Tattach messages for each user that accesses the server. The issue with remote systems having different uids is no different than any other remote file system in Linux. As somebody already mentioned, your patch isn't very clean, so I am not sure what change of behavior you propose.

Thanks,
    Lucho

On Friday, December 5, 2014, Dmitry Golubovsky <golubovsky@gmail.com> wrote:
Hi

Thanks to everybody who answered. I posted another comment to the issue 34

https://code.google.com/p/go9p/issues/detail?id=34#c2

where explained the use case and provided the diagnostics for the problem.

Briefly, the problem is: when using 9p kernel mounts in Linux over a
domain socket, a 9p server program never gets a valid numeric user ID,
just -1 regardless of the username.

Even if there was a way to pass desired numeric UID to a 9p server,
this would make little sense in case of a remote connection because on
the remote system the same user would have different (and often
unknown numeric ID).

So even in the .u mode, fallback character username recognition is
necessary to use if no valid numeric user ID can be provided.

Thanks.

--
Dmitry Golubovsky

Anywhere on the Web