On Wed 29-08-07 12:31:52, Eric W. Biederman wrote:
Yes, the quota will still be billed to Alice and originally we complained
only about Alice. Now, we are actually passing identities of two users: The
one who actually caused the quota to be exceeded and the one whose quota is
exceeded. Userspace app can then decide what to do with the information...
For example it makes sence to display the message to both Alice and Bob in
the case you've described...
OK, quota kind of works for NFSv4 - we simply enforce quotas on the
server on a traditional filesystem and there are some RPC calls to get
quota status. For 9p, it does not work. But we should probably design the
interface generic enough so that it accommodates those untraditional
cases anyway.
I see it's a complicated matter :). What I need to somehow pass to
userspace is something (and I don't really care whether it will be number,
string or whatever) that userspace can read and e.g. find a terminal
window or desktop the affected user has open and also translate the
identity to some user-understandable name (average user Joe has to
understand that he should quickly cleanup his home directory ;).
Thinking more about it, we could probably pass a string to userspace in
the format:
<namespace type>:<user identification>
So for example we can have something like:
unix:1000 (traditional unix UIDs)
nfs4:joe@machine
The problem is: Are we able to find out in which "namespace type" we are
and send enough identifying information from a context of unpriviledged
user?
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
-