mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: "Enrico Weigelt, metux IT consult" <metux@gmx.de>,
	linux-kernel@vger.kernel.org
Cc: aganti@google.com
Subject: Re: adding plan9-like usernames to the kernel
Date: Wed, 7 Feb 2018 09:57:20 -0800	[thread overview]
Message-ID: <35e47ff4-7f61-c72d-f09f-a656dc8480df@schaufler-ca.com> (raw)
In-Reply-To: <0597ffe1-f80e-d5dd-e20d-da68bd8a189a@gmx.de>

On 2/7/2018 4:38 AM, Enrico Weigelt, metux IT consult wrote:
> Hi folks,
>
>
> as part as a little research project for bringing Plan9 semantics
> to Linux, I'd like to add textual usernames. In contrast to *nix,
> Plan9 doesn't use numerical IDs, but names.
>
> Obviously that needs some internal mapping between names and ids.
>
> Should this go into struct user_namespace (where per-namespace
> uid mapping lives) or to struct cred / struct user_struct ?

Why not keep a mapping associated with your devices?

>
> The primary consumer of this username will be the /dev/caphash
> and /dev/capuse devices for switching the UID.
> (an interesting question of course is, how to allocate the
> numerical UIDs for given usernames)

You read it from /etc/passwd (or the equivalent service)
and write it to your device based list via an ioctl, or a
companion device (/dev/capset?). If no one outside your
devices is using it this would be the logical place for
the data to reside.

>
>
> --mtx
>

      reply	other threads:[~2018-02-07 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 12:38 Enrico Weigelt, metux IT consult
2018-02-07 17:57 ` Casey Schaufler [this message]

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=35e47ff4-7f61-c72d-f09f-a656dc8480df@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=aganti@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metux@gmx.de \
    /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®