summaryrefslogtreecommitdiff
path: root/sys/kern/subr_acl_posix1e.c
Commit message (Collapse)AuthorAgeFilesLines
* KSE Milestone 2Julian Elischer2001-09-121-44/+44
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* In the case of ACL_OTHER and undefined ACL entry id's, setChris D. Faulhaber2001-09-011-2/+2
| | | | | | | | | ae_id to ACL_UNDEFINED_ID instead of 0. Reviewed by: rwatson Notes: svn path=/head/; revision=82769
* Giant Pushdown ACL syscalls:Matthew Dillon2001-09-011-31/+71
| | | | | | | | | __acl_get_file, __acl_set_file, __acl_get_fd, __acl_set_fd, __acl_delete_file, __acl_delete_fd, __acl_aclcheck_file, __acl_aclcheck_fd Notes: svn path=/head/; revision=82713
* o Clarify comments in vaccess_acl_posix1e() ACL evaluation routine soRobert Watson2001-08-241-19/+23
| | | | | | | | | as to improve readability and accuracy. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=82255
* o As part of the move to not maintaining copies of the vnode owning uidRobert Watson2001-04-291-1/+1
| | | | | | | | | | | | | | | | | | | and gid in the ACL, vaccess_acl_posix1e() was changed to accept explicit file_uid and file_gid as arguments. However, in making the change, I explicitly checked file_gid against cr->cr_groups[0], rather than using groupmember, resulting in ACL_GROUP_OBJ entries being compared to the caller's effective gid only, not the remainder of its groups. This was recently corrected for the version of the group call without privilege, but the second test (when privilege is added) was missed. This change replaces an additiona cr->cr_groups[0] check with groupmember(). Pointed out by: jedgar Reviewed by: jedgar Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=76139
* Fix a bug introduced in the last commit: vaccess_acl_posix1 only checkedThomas Moestl2001-04-231-1/+1
| | | | | | | | | | the file gid gainst the egid of the accessing process for the ACL_GROUP_OBJ case, and ignored supplementary groups. Approved by: rwatson Notes: svn path=/head/; revision=75888
* In my first reading of POSIX.1e, I misinterpreted handling of theRobert Watson2001-04-171-45/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACL_USER_OBJ and ACL_GROUP_OBJ fields, believing that modification of the access ACL could be used by privileged processes to change file/directory ownership. In fact, this is incorrect; ACL_*_OBJ (+ ACL_MASK and ACL_OTHER) should have undefined ae_id fields; this commit attempts to correct that misunderstanding. o Modify arguments to vaccess_acl_posix1e() to accept the uid and gid associated with the vnode, as those can no longer be extracted from the ACL passed as an argument. Perform all comparisons against the passed arguments. This actually has the effect of simplifying a number of components of this call, as well as reducing the indent level, but now seperates handling of ACL_GROUP_OBJ from ACL_GROUP. o Modify acl_posix1e_check() to return EINVAL if the ae_id field of any of the ACL_{USER_OBJ,GROUP_OBJ,MASK,OTHER} entries is a value other than ACL_UNDEFINED_ID. As a temporary work-around to allow clean upgrades, set the ae_id field to ACL_UNDEFINED_ID before each check so that this cannot cause a failure in the short term (this work-around will be removed when the userland libraries and utilities are updated to take this change into account). o Modify ufs_sync_acl_from_inode() so that it forces ACL_{USER_OBJ,GROUP_OBJ,MASK,OTHER} ae_id fields to ACL_UNDEFINED_ID when synchronizing the ACL from the inode. o Modify ufs_sync_inode_from_acl to not propagate uid and gid information to the inode from the ACL during ACL update. Also modify the masking of permission bits that may be set from ALLPERMS to (S_IRWXU|S_IRWXG|S_IRWXO), as ACLs currently do not carry none-ACCESSPERMS (S_ISUID, S_ISGID, S_ISTXT). o Modify ufs_getacl() so that when it emulates an access ACL from the inode, it initializes the ae_id fields to ACL_UNDEFINED_ID. o Clean up ufs_setacl() substantially since it is no longer possible to perform chown/chgrp operations using vop_setacl(), so all the access control for that can be eliminated. o Modify ufs_access() so that it passes owner uid and gid information into vaccess_acl_posix1e(). Pointed out by: jedger Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=75571
* Correct the following defines to match the POSIX.1e spec:Chris D. Faulhaber2001-04-111-36/+36
| | | | | | | | | | | ACL_PERM_EXEC -> ACL_EXECUTE ACL_PERM_READ -> ACL_READ ACL_PERM_WRITE -> ACL_WRITE Obtained from: TrustedBSD Notes: svn path=/head/; revision=75404
* o Introduce filesystem-independent POSIX.1e ACL utility routines toRobert Watson2001-03-061-5/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | support implementations of ACLs in file systems. Introduce the following new functions: vaccess_acl_posix1e() vaccess() that accepts an ACL acl_posix1e_mode_to_perm() Convert mode bits to ACL rights acl_posix1e_mode_to_entry() Build ACL entry from mode/uid/gid acl_posix1e_perms_to_mode() Generate file mode from ACL acl_posix1e_check() Syntax verification for ACL These functions allow a file system to rely on central ACL evaluation and syntax checking, as well as providing useful utilities to allow ACL-based file systems to generate mode/owner/etc information to return via VOP_GETATTR(), and to support file systems that split their ACL information over their existing inode storage (mode, uid, gid) and extended ACL into extended attributes (additional users, groups, ACL mask). o Add prototypes for exported functions to sys/acl.h, sys/vnode.h Reviewed by: trustedbsd-discuss, freebsd-arch Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=73890
* Back out proc locking to protect p_ucred for obtaining additionalJohn Baldwin2001-01-271-32/+8
| | | | | | | references along with the actual obtaining of additional references. Notes: svn path=/head/; revision=71699
* Proc locking.John Baldwin2001-01-241-8/+32
| | | | Notes: svn path=/head/; revision=71500
* Staticize some malloc M_ instances.Poul-Henning Kamp2000-12-081-1/+1
| | | | Notes: svn path=/head/; revision=69774
* o Change locking rules for VOP_GETACL() to indicate that vnode locksRobert Watson2000-09-211-1/+4
| | | | | | | | | | | | | must be held when retrieving ACLs from vnodes. This is required for EA-based UFS ACL implementations. o Update vacl_get_acl() so that it does appropriate vnode locking. o Remove static from M_ACL malloc define so that it is accessible for consumers of ACLs other than in kern_acl.c Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=66184
* Remove unneeded #include <vm/vm_zone.h>Poul-Henning Kamp2000-04-301-1/+0
| | | | | | | Generated by: src/tools/tools/kerninclude Notes: svn path=/head/; revision=59794
* Fix bde'isms in acl/extattr syscall interface, renaming syscalls toRobert Watson2000-01-191-20/+16
| | | | | | | | | prettier (?) names, adding some const's around here, et al. Reviewed by: bde Notes: svn path=/head/; revision=56272
* Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson1999-12-191-0/+281
calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind Notes: svn path=/head/; revision=54803