From: Theodore Ts'o <tytso@mit.edu>
To: Sankar P <sankar.curiosity@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Storing GUIDs in Linux
Date: Sun, 30 Mar 2014 10:45:13 -0400 [thread overview]
Message-ID: <20140330144513.GF7172@thunk.org> (raw)
In-Reply-To: <CAMSEaH4gK0WVmdevuLzTs+TQC7R2kAyWU+Oz+5Ry5ederQ8vag@mail.gmail.com>
On Thu, Mar 27, 2014 at 09:33:30PM +0530, Sankar P wrote:
>
> http://en.wikipedia.org/wiki/Globally_unique_identifier is one way to
> uniquely identify users. It is used by Active Directory too. The size
> of a GUID is 128 bits.
>
> I want to store the GUID of users who creates files, on my
> experimental filesystem https://github.com/psankar/simplefs
>
> The size of the "uid" in UNIX is just 16 bits. So what is the way used
> by the Linux [filesystems] to store the GUID in linux to uniquely
> identify an user ?
>
> Were there any proposals in the past, to increase the size of the unix
> uid to match that of a GUID ?
Actually, Linux uses a 32-bit uid (as do most other Unix systems).
Changing the uid to be 128 bits would break a truly vast number of
programs, so it's not something anyone has been particularly
interested in doing.
There have been some proposals to add a 128-bit SID to the struct
creds structure, but this would be in addition to the standard unix
uid, but then local file systems would have to be modified so that the
ACL structures could accept 128-bit Windows SID's, and the of course
all of the ACL userspace utilities would have to be modified, etc.
There is a much simpler way of handling the general issue of dealing
with foreign user naming schemes, which is to have mapping systems
which map things like Kerberos Principals, or Windows SID's, into the
user's Unix uid. Typically enterprises which are unfortunate enough
to have to deal with Windows clients or servers will typically have
LDAP systems that store both a Windows SID and the Unix uid for Unix
systems, and so a user will have their /etc/passwd entry set up with
their Unix uid, and there is need to interop with a Windows CIFS
client, they can use a mapping function to translate back and forth
between the Unix UID and the Windows SID.
Sometimes there are people who are trying to build Windows CIFS
servers on top of Linux, have wanted to add the SIDs as an additional
entry in the struct creds, and then make all of the other changes in
the rest of the security ecosystem (SELinux, ACL's, etc.) to support
native SID's. I used to think this might be worth the effort, but
these days, with Windows being a bad memory for more and more people,
I'm not so sure.
Still, if someone wants to submit all of the necessary patches to
various kernel and user space components, it's not impossible. The
problem is that the only real benefit is to the companies who are
trying to sell Windows file servers to enterprises, and the costs get
imposed on many open source developers for many kernel subsystems and
user space utilities, and so getting everyone to accept the required
code maintenance is much more difficult, especially as Windows' market
share is become lower and lower, and so many of us are much happier
now that it's much easier for us to ignore Windows. :-)
- Ted
next prev parent reply other threads:[~2014-03-30 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 16:03 Storing GUIDs in Linux Sankar P
2014-03-30 14:45 ` Theodore Ts'o [this message]
2014-03-31 19:07 ` Jeremy Allison
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=20140330144513.GF7172@thunk.org \
--to=tytso@mit.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sankar.curiosity@gmail.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;
as well as URLs for NNTP newsgroup(s).