* adding plan9-like usernames to the kernel
@ 2018-02-07 12:38 Enrico Weigelt, metux IT consult
2018-02-07 17:57 ` Casey Schaufler
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2018-02-07 12:38 UTC (permalink / raw)
To: linux-kernel; +Cc: aganti
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 ?
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)
--mtx
--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: adding plan9-like usernames to the kernel
2018-02-07 12:38 adding plan9-like usernames to the kernel Enrico Weigelt, metux IT consult
@ 2018-02-07 17:57 ` Casey Schaufler
0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2018-02-07 17:57 UTC (permalink / raw)
To: Enrico Weigelt, metux IT consult, linux-kernel; +Cc: aganti
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-07 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 12:38 adding plan9-like usernames to the kernel Enrico Weigelt, metux IT consult
2018-02-07 17:57 ` Casey Schaufler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.