From: David du Colombier <0intro@gmail.com>
To: 9fans@9fans.net
Subject: Re: [9fans] p9p vac/vacfs compatibility: uid/gid, ctime, 9P2000.L, 9pserve
Date: Thu, 29 Dec 2011 00:48:56 +0100 [thread overview]
Message-ID: <20111229004856.731689ce@gmail.com> (raw)
In-Reply-To: <86zkecbc5d.fsf@cmarib.ramside>
> When I mount the file system, all the files are owned by uid = gid =
> (-2 mod 2^32), unless I tell the Linux kernel to mount the fs as a
> specific user/group. In the latter case, all files present with the
> specified user/group (as expected). I can't find any way to get at
> the actual uid/gids owning the files/directories vac'd. I have tried
> explicitly specifying -o version=9p2000.u, but it exhibits the same
> symptoms: all files and directories appear to be owned by uid = gid =
> (-2 mod 2^32). All uids/gids in the vac'd tree existed
> in /etc/{passwd,group} at the time of vac'ing, as well as at mount
> time.
The problem you are encountering is that v9fs doesn't translate
uid/gid strings back to their numeric equivalent in /etc/passwd.
Since Unix doesn't know how to handle these strings, it falls
back to -1.
Forget about 9p2000.u, it's deprecated.
> So, the source *appears* to stow uid/gid to venti as character
> strings.
This is the case. You can show the actual uid/gid from the
Plan 9 vacfs and even on p9p, using vacfs -d.
> Does this mean that vac doesn't store ctimes on p9p?
> Shouldn't this be wrapped in something like:
Yes, vac doesn't store ctime. Maybe we could store it in vac,
as you suggest, but 9P doesn't handle it anyway.
> Those dir.uidnum and dir.gidnum don't appear to be referenced anywhere
> else in the code.
I never paid much attention to it. It looks unused.
> But it makes me wonder... are the character string
> uid/gids vac'd the textual names from /etc/{passwd,group}, or just
> ASCII versions of the numeric ids, a la format "%d"?
They are the textual names.
The problem you are describing is not related to vac nor vacfs.
They both handle uid/gid properly, and, as you saw, p9p vac can
even translate numeric uid/gid to their string representation.
--
David du Colombier
next prev parent reply other threads:[~2011-12-28 23:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 21:48 smiley
2011-12-28 23:48 ` David du Colombier [this message]
2011-12-29 16:20 ` smiley
2011-12-29 17:34 ` David du Colombier
2011-12-30 16:59 ` Latchesar Ionkov
2011-12-30 17:15 ` David du Colombier
2012-01-02 6:50 ` smiley
2012-01-02 12:31 ` David du Colombier
2012-01-02 13:50 ` David du Colombier
2012-01-02 18:04 ` smiley
2012-01-02 19:14 ` David du Colombier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111229004856.731689ce@gmail.com \
--to=0intro@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).