Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2002 13:55:08 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/alpha/alpha vm_machdep.c src/sys/compat/pecoff imgact_pecoff.c src/sys/gnu/ext2fs ext2_lookup.c ext2_vnops.c src/sys/i386/i386 vm_machdep.c src/sys/ia64/ia64 vm_machdep.c src/sys/kern imgact_aout.c imgact_elf.c kern_acct.c kern_descrip.c ...
Message-ID:  <200208152055.g7FKt8Bk008361@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2002/08/15 13:55:08 PDT

  Modified files:
    sys/alpha/alpha      vm_machdep.c 
    sys/compat/pecoff    imgact_pecoff.c 
    sys/gnu/ext2fs       ext2_lookup.c ext2_vnops.c 
    sys/i386/i386        vm_machdep.c 
    sys/ia64/ia64        vm_machdep.c 
    sys/kern             imgact_aout.c imgact_elf.c kern_acct.c 
                         kern_descrip.c kern_event.c kern_linker.c 
                         link_aout.c link_elf.c sys_generic.c 
                         sys_pipe.c sys_socket.c uipc_syscalls.c 
                         vfs_vnops.c 
    sys/nfsclient        nfs_lock.c 
    sys/powerpc/powerpc  vm_machdep.c 
    sys/sys              file.h socketvar.h vnode.h 
    sys/ufs/ufs          ufs_lookup.c ufs_vnops.c 
  Log:
  In order to better support flexible and extensible access control,
  make a series of modifications to the credential arguments relating
  to file read and write operations to cliarfy which credential is
  used for what:
  
  - Change fo_read() and fo_write() to accept "active_cred" instead of
    "cred", and change the semantics of consumers of fo_read() and
    fo_write() to pass the active credential of the thread requesting
    an operation rather than the cached file cred.  The cached file
    cred is still available in fo_read() and fo_write() consumers
    via fp->f_cred.  These changes largely in sys_generic.c.
  
  For each implementation of fo_read() and fo_write(), update cred
  usage to reflect this change and maintain current semantics:
  
  - badfo_readwrite() unchanged
  - kqueue_read/write() unchanged
    pipe_read/write() now authorize MAC using active_cred rather
    than td->td_ucred
  - soo_read/write() unchanged
  - vn_read/write() now authorize MAC using active_cred but
    VOP_READ/WRITE() with fp->f_cred
  
  Modify vn_rdwr() to accept two credential arguments instead of a
  single credential: active_cred and file_cred.  Use active_cred
  for MAC authorization, and select a credential for use in
  VOP_READ/WRITE() based on whether file_cred is NULL or not.  If
  file_cred is provided, authorize the VOP using that cred,
  otherwise the active credential, matching current semantics.
  
  Modify current vn_rdwr() consumers to pass a file_cred if used
  in the context of a struct file, and to always pass active_cred.
  When vn_rdwr() is used without a file_cred, pass NOCRED.
  
  These changes should maintain current semantics for read/write,
  but avoid a redundant passing of fp->f_cred, as well as making
  it more clear what the origin of each credential is in file
  descriptor read/write operations.
  
  Follow-up commits will make similar changes to other file descriptor
  operations, and modify the MAC framework to pass both credentials
  to MAC policy modules so they can implement either semantic for
  revocation.
  
  Obtained from:  TrustedBSD Project
  Sponsored by:   DARPA, NAI Labs
  
  Revision  Changes    Path
  1.70      +2 -2      src/sys/alpha/alpha/vm_machdep.c
  1.19      +3 -3      src/sys/compat/pecoff/imgact_pecoff.c
  1.36      +2 -2      src/sys/gnu/ext2fs/ext2_lookup.c
  1.68      +7 -5      src/sys/gnu/ext2fs/ext2_vnops.c
  1.190     +2 -1      src/sys/i386/i386/vm_machdep.c
  1.43      +2 -2      src/sys/ia64/ia64/vm_machdep.c
  1.82      +2 -2      src/sys/kern/imgact_aout.c
  1.116     +4 -2      src/sys/kern/imgact_elf.c
  1.48      +1 -1      src/sys/kern/kern_acct.c
  1.153     +5 -4      src/sys/kern/kern_descrip.c
  1.42      +4 -4      src/sys/kern/kern_event.c
  1.94      +1 -1      src/sys/kern/kern_linker.c
  1.38      +4 -2      src/sys/kern/link_aout.c
  1.55      +10 -5     src/sys/kern/link_elf.c
  1.108     +4 -4      src/sys/kern/sys_generic.c
  1.113     +8 -8      src/sys/kern/sys_pipe.c
  1.42      +4 -4      src/sys/kern/sys_socket.c
  1.129     +6 -1      src/sys/kern/uipc_syscalls.c
  1.161     +28 -19    src/sys/kern/vfs_vnops.c
  1.24      +1 -1      src/sys/nfsclient/nfs_lock.c
  1.74      +1 -1      src/sys/powerpc/powerpc/vm_machdep.c
  1.49      +12 -10    src/sys/sys/file.h
  1.92      +3 -3      src/sys/sys/socketvar.h
  1.203     +4 -2      src/sys/sys/vnode.h
  1.65      +2 -2      src/sys/ufs/ufs/ufs_lookup.c
  1.204     +1 -1      src/sys/ufs/ufs/ufs_vnops.c

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208152055.g7FKt8Bk008361>