freebsd-skq/sys/nfsclient
rwatson f504530d9f o Merge contents of struct pcred into struct ucred. Specifically, add the
real uid, saved uid, real gid, and saved gid to ucred, as well as the
  pcred->pc_uidinfo, which was associated with the real uid, only rename
  it to cr_ruidinfo so as not to conflict with cr_uidinfo, which
  corresponds to the effective uid.
o Remove p_cred from struct proc; add p_ucred to struct proc, replacing
  original macro that pointed.
  p->p_ucred to p->p_cred->pc_ucred.
o Universally update code so that it makes use of ucred instead of pcred,
  p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo,
  cr_{r,sv}{u,g}id instead of p_*, etc.
o Remove pcred0 and its initialization from init_main.c; initialize
  cr_ruidinfo there.
o Restruction many credential modification chunks to always crdup while
  we figure out locking and optimizations; generally speaking, this
  means moving to a structure like this:
        newcred = crdup(oldcred);
        ...
        p->p_ucred = newcred;
        crfree(oldcred);
  It's not race-free, but better than nothing.  There are also races
  in sys_process.c, all inter-process authorization, fork, exec, and
  exit.
o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid;
  remove comments indicating that the old arrangement was a problem.
o Restructure exec1() a little to use newcred/oldcred arrangement, and
  use improved uid management primitives.
o Clean up exit1() so as to do less work in credential cleanup due to
  pcred removal.
o Clean up fork1() so as to do less work in credential cleanup and
  allocation.
o Clean up ktrcanset() to take into account changes, and move to using
  suser_xxx() instead of performing a direct uid==0 comparision.
o Improve commenting in various kern_prot.c credential modification
  calls to better document current behavior.  In a couple of places,
  current behavior is a little questionable and we need to check
  POSIX.1 to make sure it's "right".  More commenting work still
  remains to be done.
o Update credential management calls, such as crfree(), to take into
  account new ruidinfo reference.
o Modify or add the following uid and gid helper routines:
      change_euid()
      change_egid()
      change_ruid()
      change_rgid()
      change_svuid()
      change_svgid()
  In each case, the call now acts on a credential not a process, and as
  such no longer requires more complicated process locking/etc.  They
  now assume the caller will do any necessary allocation of an
  exclusive credential reference.  Each is commented to document its
  reference requirements.
o CANSIGIO() is simplified to require only credentials, not processes
  and pcreds.
o Remove lots of (p_pcred==NULL) checks.
o Add an XXX to authorization code in nfs_lock.c, since it's
  questionable, and needs to be considered carefully.
o Simplify posix4 authorization code to require only credentials, not
  processes and pcreds.  Note that this authorization, as well as
  CANSIGIO(), needs to be updated to use the p_cansignal() and
  p_cansched() centralized authorization routines, as they currently
  do not take into account some desirable restrictions that are handled
  by the centralized routines, as well as being inconsistent with other
  similar authorization instances.
o Update libkvm to take these changes into account.

Obtained from:	TrustedBSD Project
Reviewed by:	green, bde, jhb, freebsd-arch, freebsd-audit
2001-05-25 16:59:11 +00:00
..
bootp_subr.c Enable use of DHCP extensions. 2001-02-02 02:35:40 +00:00
krpc_subr.c * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
krpc.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfs_bio.c Assert Giant is held by the caller rather than getting it and releasing 2001-05-23 22:26:05 +00:00
nfs_lock.c o Merge contents of struct pcred into struct ucred. Specifically, add the 2001-05-25 16:59:11 +00:00
nfs_lock.h Implement client side NFS locks. 2001-04-17 20:45:23 +00:00
nfs_nfsiod.c Revert consequences of changes to mount.h, part 2. 2001-04-29 02:45:39 +00:00
nfs_node.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
nfs_socket.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
nfs_subs.c Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
nfs_vfsops.c Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
nfs_vnops.c - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION file 2001-05-23 09:42:29 +00:00
nfs.h Implement client side NFS locks. 2001-04-17 20:45:23 +00:00
nfsargs.h Implement client side NFS locks. 2001-04-17 20:45:23 +00:00
nfsdiskless.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsm_subs.h * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
nfsmount.h In preparation for deprecating CIRCLEQ macros in favor of TAILQ 2000-11-14 08:00:39 +00:00
nfsnode.h In preparation for deprecating CIRCLEQ macros in favor of TAILQ 2000-11-14 08:00:39 +00:00
nfsstats.h Implement client side NFS locks. 2001-04-17 20:45:23 +00:00
nlminfo.h Implement client side NFS locks. 2001-04-17 20:45:23 +00:00