mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Balbir Singh <balbir@in.ibm.com>,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	containers@lists.osdl.org
Subject: Re: [PATCH] Send quota messages via netlink
Date: Wed, 29 Aug 2007 15:06:43 -0600	[thread overview]
Message-ID: <m1wsve2gpo.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070829192653.GD7814@duck.suse.cz> (Jan Kara's message of "Wed, 29 Aug 2007 21:26:53 +0200")

Jan Kara <jack@suse.cz> writes:

>
>> However I'm still confused about the use of current->user.  If that
>> is what we really want and not the user who's quota will be charged
>> it gets to be a really trick business, because potentially the uid
>> we want to deliver varies depending on who opened the netlink socket.
>   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?

Ok.  This provides enough context to understand what you are trying to do.
You do want the unix user id, not the filesystem notion.  Because you
are looking for the user.

So we have to figure out how to do the hard thing which is look at
who opened our netlink broadcast see if they are in the same user
namespace as current->user.  Which is a pain and we don't currently
have the infrastructure for.

Eric

  reply	other threads:[~2007-08-29 21:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 14:13 Jan Kara
2007-08-29  4:13 ` Andrew Morton
2007-08-29  4:54   ` David Miller
2007-08-29  5:41   ` Eric W. Biederman
2007-08-29  6:30   ` Balbir Singh
2007-08-29 12:46     ` Jan Kara
2007-08-31  6:59       ` Balbir Singh
2007-09-03 10:18         ` Jan Kara
2007-08-29 12:26   ` Jan Kara
2007-08-29 15:57     ` Randy Dunlap
2007-08-29 18:31     ` Eric W. Biederman
2007-08-29 19:26       ` Jan Kara
2007-08-29 21:06         ` Eric W. Biederman [this message]
2007-08-29 21:19           ` Valdis.Kletnieks
2007-08-30  9:25           ` Jan Kara
2007-08-30 17:33             ` Eric W. Biederman
2007-08-30 18:54               ` Serge E. Hallyn
2007-08-30 19:18               ` Serge E. Hallyn
2007-08-30 19:10             ` Serge E. Hallyn
2007-08-30 22:18               ` Jan Kara
2007-08-30 22:14                 ` Serge E. Hallyn
2007-09-03 14:21                   ` Jan Kara
2007-09-04 21:32                     ` Serge E. Hallyn
2007-09-04 22:49                       ` Jan Kara
2007-09-04 23:48                         ` Serge E. Hallyn
2007-09-05 13:32                           ` Jan Kara
2007-09-05 14:28                             ` Serge E. Hallyn
2007-08-29  4:51 ` Andrew Morton
2007-08-29 10:03   ` Jan Kara
2007-09-03 14:43   ` Jan Kara
2007-09-03 17:12     ` Randy Dunlap
2007-09-03 17:48       ` Jan Kara
2007-09-03 18:41         ` Andrew Morton

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=m1wsve2gpo.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@in.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serue@us.ibm.com \
    /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

all inboxes | Powered by JetHome®