aboutsummaryrefslogtreecommitdiff
path: root/sys/security/lomac
Commit message (Collapse)AuthorAgeFilesLines
* Unhook the old LOMAC module, now replaced with mac_lomac.Robert Watson2002-12-0327-6787/+0
| | | | | | | | | Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=107548
* Regularize the vop_stdlock'ing protocol across all the filesystemsKirk McKusick2002-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=105077
* - Use vrefcnt() instead of v_usecount.Jeff Roberson2002-09-251-4/+4
| | | | Notes: svn path=/head/; revision=103942
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.Nate Lawson2002-09-142-2/+2
| | | | | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version) Notes: svn path=/head/; revision=103314
* Keep a copy of the credential used to mount filesystems around soPoul-Henning Kamp2002-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | we can check and use it later on. Change the pieces of code which relied on mount->mnt_stat.f_owner to check which user mounted the filesystem. This became needed as the EA code needs to be able to allocate blocks for "system" EA users like ACLs. There seems to be some half-baked (probably only quarter- actually) notion that the superuser for a given filesystem is the user who mounted it, but this has far from been carried through. It is unclear if it should be. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=102088
* - Replace v_flag with v_iflag and v_vflagJeff Roberson2002-08-045-15/+16
| | | | | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS Notes: svn path=/head/; revision=101308
* Get rid of warnings, there's no need to do preprocessor concatination ofAlfred Perlstein2002-06-011-2/+2
| | | | | | | things with commas and equal signs. Notes: svn path=/head/; revision=97716
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-312-57/+16
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* Check for defined(__i386__) instead of just defined(i386) since the compilerAlfred Perlstein2002-05-301-1/+1
| | | | | | | will be updated to only define(__i386__) for ANSI cleanliness. Notes: svn path=/head/; revision=97556
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-202-16/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred Notes: svn path=/head/; revision=96972
* Change p_can{debug,see,sched,signal}()'s first argument to be a threadJohn Baldwin2002-05-191-4/+2
| | | | | | | | | | pointer instead of a proc pointer and require the process pointed to by the second argument to be locked. We now use the thread ucred reference for the credential checks in p_can*() as a result. p_canfoo() should now no longer need Giant. Notes: svn path=/head/; revision=96886
* More s/file system/filesystem/gTom Rhodes2002-05-162-4/+4
| | | | Notes: svn path=/head/; revision=96755
* Use the proc lock to protect p_ucred while we read a few items from it.John Baldwin2002-04-111-2/+9
| | | | Notes: svn path=/head/; revision=94460
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-012-3/+3
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* DBA update: pick the right DBA for various LOMAC copyrights.Robert Watson2002-03-1327-27/+27
| | | | Notes: svn path=/head/; revision=92245
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredJohn Baldwin2002-02-273-6/+5
| | | | | | | reference. Notes: svn path=/head/; revision=91406
* Introduce a version field to `struct xucred' in place of one of theDima Dorfman2002-02-271-5/+1
| | | | | | | | | | | | | | | spares (the size of the field was changed from u_short to u_int to reflect what it really ends up being). Accordingly, change users of xucred to set and check this field as appropriate. In the kernel, this is being done inside the new cru2x() routine which takes a `struct ucred' and fills out a `struct xucred' according to the former. This also has the pleasant sideaffect of removing some duplicate code. Reviewed by: rwatson Notes: svn path=/head/; revision=91354
* Part I: Update extended attribute API and ABI:Robert Watson2002-02-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=90448
* Replace a few more lines of code orphaned by MFREE going away.Matt Jacob2002-02-071-2/+2
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=90365
* Pre-KSE/M3 commit.Julian Elischer2002-02-071-1/+1
| | | | | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice, Notes: svn path=/head/; revision=90361
* s/sonewconn3/sonewconn/ forgotten by the modifier.Brian Feldman2001-12-261-1/+1
| | | | Notes: svn path=/head/; revision=88500
* Split out NAI Labs license and BSD license to prevent the accidentalBrian Feldman2001-12-032-9/+80
| | | | | | | violation of either. Notes: svn path=/head/; revision=87251
* Return a POSIX-compliant error for write(2) failure.Brian Feldman2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87074
* Import LOMAC preliminary release 2.0.0 in src/sys/security. These files mayvendor/lomac/2.2.0vendor/lomacBrian Feldman2001-11-1927-0/+6714
be modified and do not have to remain on the vendor branch. http://opensource.nailabs.com/lomac/index.html Sponsored by: DARPA, NAI Labs (CBOSS project) Notes: svn path=/cvs2svn/branches/NAILabs/; revision=86629 svn path=/cvs2svn/tags/LOMAC_2_2_0/; revision=86631; tag=vendor/lomac/2.2.0