aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/acl.h
Commit message (Collapse)AuthorAgeFilesLines
* sys/sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326256
* Expose an interface to determine if an ACE is inherited.Xin LI2015-09-041-1/+2
| | | | | | | | | | Submitted by: sef Reviewed by: trasz MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3540 Notes: svn path=/head/; revision=287445
* Make it possible to use permission sets (full_set, modify_set, read_setEdward Tomasz Napierala2011-04-091-1/+12
| | | | | | | | | | | and write_set) with setfacl(1). PR: kern/154113 Submitted by: Shawn Webb <lattera at gmail dot com> (earlier version) MFC after: 1 month Notes: svn path=/head/; revision=220465
* Move the code around so that libc behaviour does not depend on a variableEdward Tomasz Napierala2011-03-221-2/+0
| | | | | | | that was supposed to be kernel-only. There should be no functional changes. Notes: svn path=/head/; revision=219878
* First step at adopting FreeBSD to support PSARC/2010/029. This makesEdward Tomasz Napierala2010-09-201-0/+2
| | | | | | | | | acl_is_trivial_np(3) properly recognize the new trivial ACLs. From the user point of view, that means "ls -l" no longer shows plus signs for all the files when running ZFS v28. Notes: svn path=/head/; revision=212906
* Cosmetic fixes.Edward Tomasz Napierala2009-12-221-6/+6
| | | | Notes: svn path=/head/; revision=200829
* Add NFSv4 ACL support to libc.Edward Tomasz Napierala2009-06-251-4/+50
| | | | | | | | | | | | | | This adds the following functions to the acl(3) API: acl_add_flag_np, acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np, acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np, acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np, acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin does. There are no backward-incompatible changes. Approved by: rwatson@ Notes: svn path=/head/; revision=194955
* Add new #defines neccessary to support NFSv4 ACLs.Edward Tomasz Napierala2009-05-231-6/+58
| | | | | | | Reviewed by: rwatson Notes: svn path=/head/; revision=192652
* Make 'struct acl' larger, as required to support NFSv4 ACLs. ProvideEdward Tomasz Napierala2009-05-221-18/+101
| | | | | | | | | compatibility interfaces in both kernel and libc. Reviewed by: rwatson Notes: svn path=/head/; revision=192586
* Use acl_alloc() and acl_free() instead of using uma(9) directly.Edward Tomasz Napierala2009-04-181-2/+2
| | | | | | | | | This will make switching to malloc(9) easier; also, it would be neccessary to add these routines if/when we implement variable-size ACLs. Notes: svn path=/head/; revision=191249
* Minor white space tweaks in comments.Robert Watson2007-03-161-12/+12
| | | | Notes: svn path=/head/; revision=167635
* Convert the primary ACL allocator from malloc(9) to using a UMA zone instead.Christian S.J. Peron2005-09-061-7/+6
| | | | | | | | | | | Also introduce an aclinit function which will be used to create the UMA zone for use by file systems at system start up. MFC after: 1 month Discussed with: rwatson Notes: svn path=/head/; revision=149811
* Remove unimplemented ACL types.Robert Watson2005-05-121-4/+0
| | | | | | | Reported by: Hervé Kergourlay <herve dot kergourlay at atempo dot com> Notes: svn path=/head/; revision=146165
* Improve consistency of include file guards in src/sys/sys by terminatingRobert Watson2004-05-101-3/+3
| | | | | | | | | them with '_', as well as beginning with '_'. Observed by: bde Notes: svn path=/head/; revision=129096
* Move more ACL logic from the UFS code (ufs_acl.c) to the central POSIX.1eRobert Watson2003-08-041-5/+27
| | | | | | | | | | | | | | | | | | | | | support routines in kern_acl.c: - Define ACL_OVERRIDE_MASK and ACL_PRESERVE_MASK centrally in acl.h: the mode bits that are (and aren't) stored in the ACL. - Add acl_posix1e_acl_to_mode(): given a POSIX.1e extended ACL, generate a compatibility mode (only the bits supported by the POSIX.1e ACL). - acl_posix1e_newfilemode(): Given a requested creation mode and default ACL, calculate the mode for the new file system object (only the bits supported by the POSIX.1e ACL). PR: 50148 Reported by: Ritz, Bruno <bruno_ritz@gmx.ch> Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=118407
* Provide prototypes for new ACL system calls to manipulate ACLs "byRobert Watson2002-12-291-1/+11
| | | | | | | | | name" without following symbolic links, as well as library wrappers. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=108408
* More s/file system/filesystem/gTom Rhodes2002-05-161-1/+1
| | | | Notes: svn path=/head/; revision=96755
* Remove __PAlfred Perlstein2002-03-191-5/+5
| | | | Notes: svn path=/head/; revision=92719
* Remove bogus _POSIX_ACL_PATH_MAX definition.Brian Feldman2002-01-221-1/+0
| | | | Notes: svn path=/head/; revision=89673
* o Update copyright dates.Robert Watson2001-11-011-0/+2
| | | | | | | | | | o Add reference to TrustedBSD Project in license header. o Update dated comments, including comment in extattr.h claiming that no file systems support extended attributes. o Improve comment consistency. Notes: svn path=/head/; revision=85845
* o Modify copyright date format for improved consistency: use '-' forRobert Watson2001-10-271-1/+1
| | | | | | | year ranges, rather than a comma-delimited list of years. Notes: svn path=/head/; revision=85584
* o Separate acl_t into internal and external representations asChris D. Faulhaber2001-04-241-3/+10
| | | | | | | | | | | | | | required by POSIX.1e. This maintains the current 'struct acl' in the kernel while providing the generic external acl_t interface required to complete the ACL editing library. o Add the acl_get_entry() function. o Convert the existing ACL utilities, getfacl and setfacl, to fully make use of the ACL editing library. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=75928
* Fix the cut'n'paste style bugs I introduced in rev 1.16Chris D. Faulhaber2001-04-211-3/+3
| | | | | | | (spaces -> tab(s) in #define's) Notes: svn path=/head/; revision=75800
* Add acl_get_perm_np(3), a non-portable function to check if aChris D. Faulhaber2001-04-131-0/+1
| | | | | | | | | | | permission is in a permission set, required for third-party applications such as Samba. Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=75492
* Add the remaining POSIX.1e ACL definitions:Chris D. Faulhaber2001-04-131-7/+20
| | | | | | | | | | ACL_UNDEFINED_TAG, ACL_UNDEFINED_ID, ACL_FIRST_ENTRY, ACL_NEXT_ENTRY Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=75490
* Correct the following defines to match the POSIX.1e spec:Chris D. Faulhaber2001-04-111-6/+6
| | | | | | | | | | | ACL_PERM_EXEC -> ACL_EXECUTE ACL_PERM_READ -> ACL_READ ACL_PERM_WRITE -> ACL_WRITE Obtained from: TrustedBSD Notes: svn path=/head/; revision=75404
* Add the following ACL editing functions:Chris D. Faulhaber2001-03-221-0/+16
| | | | | | | | | | | | | acl_add_perm, acl_clear_perms, acl_copy_entry, acl_create_entry, acl_delete_perm, acl_get_permset, acl_get_qualifier, acl_get_tag_type, acl_set_permset, acl_set_qualifier, acl_set_tag_type This brings us within 4 functions of a full ACL editing library. Reviewed by: rwatson Notes: svn path=/head/; revision=74667
* Add the following POSIX 1003.1e functions and man pages:Chris D. Faulhaber2001-03-191-0/+2
| | | | | | | | | | | | o acl_calc_mask(): calculates the ACL mask entry associated with the given ACL. o acl_delete_entry(): remove a specified ACL entry from the given ACL. Approved by: rwatson Notes: svn path=/head/; revision=74432
* o Change the API and ABI of the Extended Attribute kernel interfaces toRobert Watson2001-03-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a new argument, "namespace", rather than relying on a first- character namespace indicator. This is in line with more recent thinking on EA interfaces on various mailing lists, including the posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces are defined by default, EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER, where the primary distinction lies in the access control model: user EAs are accessible based on the normal MAC and DAC file/directory protections, and system attributes are limited to kernel-originated or appropriately privileged userland requests. o These API changes occur at several levels: the namespace argument is introduced in the extattr_{get,set}_file() system call interfaces, at the vnode operation level in the vop_{get,set}extattr() interfaces, and in the UFS extended attribute implementation. Changes are also introduced in the VFS extattrctl() interface (system call, VFS, and UFS implementation), where the arguments are modified to include a namespace field, as well as modified to advoid direct access to userspace variables from below the VFS layer (in the style of recent changes to mount by adrian@FreeBSD.org). This required some cleanup and bug fixing regarding VFS locks and the VFS interface, as a vnode pointer may now be optionally submitted to the VFS_EXTATTRCTL() call. Updated documentation for the VFS interface will be committed shortly. o In the near future, the auto-starting feature will be updated to search two sub-directories to the ".attribute" directory in appropriate file systems: "user" and "system" to locate attributes intended for those namespaces, as the single filename is no longer sufficient to indicate what namespace the attribute is intended for. Until this is committed, all attributes auto-started by UFS will be placed in the EXTATTR_NAMESPACE_SYSTEM namespace. o The default POSIX.1e attribute names for ACLs and Capabilities have been updated to no longer include the '$' in their filename. As such, if you're using these features, you'll need to rename the attribute backing files to the same names without '$' symbols in front. o Note that these changes will require changes in userland, which will be committed shortly. These include modifications to the extended attribute utilities, as well as to libutil for new namespace string conversion routines. Once the matching userland changes are committed, a buildworld is recommended to update all the necessary include files and verify that the kernel and userland environments are in sync. Note: If you do not use extended attributes (most people won't), upgrading is not imperative although since the system call API has changed, the new userland extended attribute code will no longer compile with old include files. o Couple of minor cleanups while I'm there: make more code compilation conditional on FFS_EXTATTR, which should recover a bit of space on kernels running without EA's, as well as update copyright dates. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=74273
* o Introduce filesystem-independent POSIX.1e ACL utility routines toRobert Watson2001-03-061-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* o Correct typos in comment fields.Robert Watson2001-01-071-4/+4
| | | | | | | | | o Update copyright to 2001. Submitted by: jedgar Notes: svn path=/head/; revision=70759
* o Add two constants mapping ACLs into extended attribute namesRobert Watson2000-09-211-8/+9
| | | | | | | | | | o Add '.'s in comments to style(9)-ify them. o Clean up whitespace a little. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=66186
* Fix man page structures/constants to match recent changes in acl.hRobert Watson2000-01-281-49/+35
| | | | | | | | | | | | Fix a few more namespace messes and whitespace curiosities in acl.h Fix comments in acl.h Clean up some function prototypes from acl.h that won't be committed before the code freeze. Some of this kindly pointed out by: the ever patient bde Notes: svn path=/head/; revision=56753
* A few more touchups:Robert Watson2000-01-261-4/+9
| | | | | | | | | | | | - clean up unneeded AFS ID type - Add Coda, NTFS, NWFS ACL types - Add acl_dup() prototype - Remove acl_calc_mask, which belongs in the editing library - Introduce posix1e.3, a man page introducing POSIX.1e library calls (more man pages to follow) Notes: svn path=/head/; revision=56638
* Minor fixes to library interface to improve POSIX.1e compliance. ThisRobert Watson2000-01-261-5/+9
| | | | | | | | | | | | | adds _np to a couple of function prototypes that provided more broad/useful interfaces than POSIX.1e interfaces included. Also, move from using a heuristic to identify POSIX.1e-semantic ACLs to using different ACL types for non-POSIX.1e ACLs. This should clean up the existing fuzzy logic that determined when acl_sort() should be applied before kernel submission. Notes: svn path=/head/; revision=56625
* A few more style cleanupsRobert Watson2000-01-201-14/+9
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=56312
* Fix bde'isms in acl/extattr syscall interface, renaming syscalls toRobert Watson2000-01-191-56/+45
| | | | | | | | | prettier (?) names, adding some const's around here, et al. Reviewed by: bde Notes: svn path=/head/; revision=56272
* IRIX interoperability -- define ACL_MAX_ENTRIES from MAX_ACL_ENTRIESRobert Watson2000-01-181-0/+1
| | | | Notes: svn path=/head/; revision=56220
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-3/+3
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson1999-12-191-0/+169
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