Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2001 13:03:43 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   ucred -> cred, cr_<e>[ug]id
Message-ID:  <Pine.NEB.3.96L.1010904130008.54921D-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

Earlier this year, I merged the 'pcred' and 'ucred' structures into a
single 'ucred' structure, recognizing that in practice our use of pcred
and ucred was such that the costs of the change were low, but the clarity
associated with the change was relatively high.  This simplified things
from a variety of perspective, including reference counting and
synchronization.  This is a change also performed on a number of other
UNIX platforms, including Solaris and IRIX.  However, on those platforms,
the single structure is called 'cred' and not 'ucred'.  As such, I'd like
to propose that we do the following:

o Replace all references to struct ucred with struct cred
o Repo-copy src/sys/ucred.h to src/sys/cred.h

I don't feel all that strongly about this change, but do think it would
make sense given the use of the structure, and the evolution of other
platforms making similar classes of changes.

On a similar note, when I merged ucred and pcred, I maintained cr_uid as
the effective uid: other platforms typically stick an 'e' in front to get
cr_euid, making it consistent with other variables in the structure.  If I
were to make the 'cred' change, I'd also improve consistency by adding the
'e' to the effective uid and gid structures.

Any strong reasons not to do this?

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1010904130008.54921D-100000>