003 File Manager
Current Path:
/usr/src/sys/sys
usr
/
src
/
sys
/
sys
/
π
..
π
_atomic64e.h
(2.91 KB)
π
_atomic_subword.h
(7.27 KB)
π
_bitset.h
(2.3 KB)
π
_blockcount.h
(1.97 KB)
π
_bus_dma.h
(2.15 KB)
π
_callout.h
(2.68 KB)
π
_cpuset.h
(1.76 KB)
π
_cscan_atomic.h
(18.1 KB)
π
_cscan_bus.h
(10.22 KB)
π
_domainset.h
(2.04 KB)
π
_eventhandler.h
(2.81 KB)
π
_ffcounter.h
(1.84 KB)
π
_iovec.h
(1.93 KB)
π
_lock.h
(2.98 KB)
π
_lockmgr.h
(1.82 KB)
π
_mutex.h
(2.63 KB)
π
_null.h
(1.7 KB)
π
_pctrie.h
(1.65 KB)
π
_pthreadtypes.h
(3.51 KB)
π
_rangeset.h
(1.86 KB)
π
_rmlock.h
(2.59 KB)
π
_rwlock.h
(2.39 KB)
π
_semaphore.h
(2.05 KB)
π
_seqc.h
(160 B)
π
_sigset.h
(2.46 KB)
π
_smr.h
(1.94 KB)
π
_sockaddr_storage.h
(2.37 KB)
π
_stack.h
(1.53 KB)
π
_stdarg.h
(2.15 KB)
π
_stdint.h
(2.6 KB)
π
_sx.h
(1.73 KB)
π
_task.h
(2.62 KB)
π
_termios.h
(7.64 KB)
π
_timespec.h
(2 KB)
π
_timeval.h
(1.88 KB)
π
_types.h
(5.66 KB)
π
_ucontext.h
(2.08 KB)
π
_uio.h
(1.99 KB)
π
_umtx.h
(2.5 KB)
π
_unrhdr.h
(1.92 KB)
π
_winsize.h
(2.14 KB)
π
aac_ioctl.h
(7.56 KB)
π
abi_compat.h
(2.42 KB)
π
acct.h
(4.95 KB)
π
acl.h
(14.62 KB)
π
agpio.h
(5.78 KB)
π
aio.h
(7.69 KB)
π
alq.h
(4.5 KB)
π
apm.h
(88 B)
π
arb.h
(28.88 KB)
π
assym.h
(2.7 KB)
π
ata.h
(45.35 KB)
π
atomic_common.h
(3.26 KB)
π
auxv.h
(1.58 KB)
π
backlight.h
(2.02 KB)
π
bio.h
(6.77 KB)
π
bitset.h
(8.53 KB)
π
bitstring.h
(12.16 KB)
π
blist.h
(3.74 KB)
π
blockcount.h
(3.03 KB)
π
boot.h
(1.8 KB)
π
buf.h
(20.73 KB)
π
buf_ring.h
(10.6 KB)
π
bufobj.h
(5.03 KB)
π
bus.h
(38.2 KB)
π
bus_dma.h
(13.68 KB)
π
bus_dma_internal.h
(2.42 KB)
π
busdma_bufalloc.h
(4.7 KB)
π
callout.h
(6.62 KB)
π
caprights.h
(4.17 KB)
π
capsicum.h
(17.54 KB)
π
cdefs.h
(27.79 KB)
π
cdio.h
(7.09 KB)
π
cdrio.h
(4.88 KB)
π
cfictl.h
(2.21 KB)
π
chio.h
(9.53 KB)
π
ck.h
(251 B)
π
clock.h
(8.07 KB)
π
cnv.h
(4.25 KB)
π
compressor.h
(2.05 KB)
π
condvar.h
(3.42 KB)
π
conf.h
(12.4 KB)
π
cons.h
(5.22 KB)
π
consio.h
(14.01 KB)
π
copyright.h
(1.97 KB)
π
counter.h
(3.02 KB)
π
coverage.h
(2.36 KB)
π
cpu.h
(7.02 KB)
π
cpuctl.h
(2.29 KB)
π
cpuset.h
(5.93 KB)
π
csan.h
(1.71 KB)
π
ctype.h
(2.81 KB)
π
devctl.h
(1.76 KB)
π
devicestat.h
(6.97 KB)
π
devmap.h
(4.04 KB)
π
dirent.h
(4.78 KB)
π
disk
π
disk.h
(6.31 KB)
π
disk_zone.h
(6.52 KB)
π
disklabel.h
(4.39 KB)
π
diskmbr.h
(1.84 KB)
π
dkstat.h
(2.05 KB)
π
dnv.h
(3.39 KB)
π
domain.h
(3.64 KB)
π
domainset.h
(5.05 KB)
π
dtrace_bsd.h
(6.93 KB)
π
dvdio.h
(3.43 KB)
π
efi.h
(6.21 KB)
π
efiio.h
(2.06 KB)
π
elf.h
(1.6 KB)
π
elf32.h
(7.46 KB)
π
elf64.h
(7.79 KB)
π
elf_common.h
(59.51 KB)
π
elf_generic.h
(2.83 KB)
π
endian.h
(4.98 KB)
π
epoch.h
(4.01 KB)
π
errno.h
(8.29 KB)
π
eui64.h
(2.05 KB)
π
event.h
(12.61 KB)
π
eventfd.h
(1.86 KB)
π
eventhandler.h
(11.8 KB)
π
eventvar.h
(2.46 KB)
π
exec.h
(4.56 KB)
π
extattr.h
(4.08 KB)
π
fail.h
(13.1 KB)
π
fbio.h
(19.95 KB)
π
fcntl.h
(12.02 KB)
π
fdcio.h
(7.6 KB)
π
file.h
(14.06 KB)
π
filedesc.h
(12.13 KB)
π
filio.h
(3.67 KB)
π
firmware.h
(3.11 KB)
π
fnv_hash.h
(1.41 KB)
π
font.h
(3.85 KB)
π
gmon.h
(7.16 KB)
π
gpio.h
(9.85 KB)
π
gpt.h
(1.51 KB)
π
gsb_crc32.h
(998 B)
π
gtaskqueue.h
(4.21 KB)
π
hash.h
(3.55 KB)
π
hhook.h
(5.86 KB)
π
iconv.h
(8.22 KB)
π
imgact.h
(5.22 KB)
π
imgact_aout.h
(5.65 KB)
π
imgact_binmisc.h
(6.95 KB)
π
imgact_elf.h
(4.13 KB)
π
interrupt.h
(8.07 KB)
π
intr.h
(5.36 KB)
π
ioccom.h
(3.82 KB)
π
ioctl.h
(2.24 KB)
π
ioctl_compat.h
(6.42 KB)
π
iov.h
(11.67 KB)
π
iov_schema.h
(2.33 KB)
π
ipc.h
(4.93 KB)
π
ipmi.h
(5.4 KB)
π
jail.h
(14.98 KB)
π
joystick.h
(2.12 KB)
π
kbio.h
(7.81 KB)
π
kcov.h
(2.36 KB)
π
kdb.h
(5.04 KB)
π
kenv.h
(2.02 KB)
π
kern_prefetch.h
(1.67 KB)
π
kernel.h
(16.18 KB)
π
kerneldump.h
(4.85 KB)
π
khelp.h
(3.08 KB)
π
kobj.h
(6.92 KB)
π
kpilite.h
(2.01 KB)
π
ksem.h
(2.34 KB)
π
kthread.h
(3.04 KB)
π
ktls.h
(6.52 KB)
π
ktr.h
(10.92 KB)
π
ktr_class.h
(3.8 KB)
π
ktrace.h
(8.13 KB)
π
libkern.h
(7.74 KB)
π
limits.h
(3.69 KB)
π
link_aout.h
(10.2 KB)
π
link_elf.h
(4.06 KB)
π
linker.h
(11.88 KB)
π
linker_set.h
(3.85 KB)
π
lock.h
(12.24 KB)
π
lock_profile.h
(2.6 KB)
π
lockf.h
(5.55 KB)
π
lockmgr.h
(7 KB)
π
lockstat.h
(5.13 KB)
π
loginclass.h
(2.08 KB)
π
mac.h
(3.96 KB)
π
malloc.h
(11.76 KB)
π
mbuf.h
(50.74 KB)
π
mchain.h
(4.21 KB)
π
md4.h
(1.63 KB)
π
md5.h
(1.81 KB)
π
mdioctl.h
(3.73 KB)
π
memdesc.h
(3.79 KB)
π
memrange.h
(2.36 KB)
π
mman.h
(10.41 KB)
π
module.h
(8.77 KB)
π
module_khelp.h
(3.45 KB)
π
mount.h
(42.05 KB)
π
mouse.h
(12.69 KB)
π
mpt_ioctl.h
(4.27 KB)
π
mqueue.h
(1.86 KB)
π
msg.h
(4.78 KB)
π
msgbuf.h
(3.49 KB)
π
mtio.h
(11.94 KB)
π
mutex.h
(19.18 KB)
π
namei.h
(11.27 KB)
π
nlist_aout.h
(4.23 KB)
π
nv.h
(10.62 KB)
π
osd.h
(4.02 KB)
π
param.h
(12.23 KB)
π
pciio.h
(5.67 KB)
π
pcpu.h
(9.79 KB)
π
pctrie.h
(5.19 KB)
π
physmem.h
(2.92 KB)
π
pidctrl.h
(5.44 KB)
π
pipe.h
(4.63 KB)
π
pmc.h
(37.29 KB)
π
pmckern.h
(8.01 KB)
π
pmclog.h
(9.23 KB)
π
poll.h
(4.03 KB)
π
posix4.h
(3.71 KB)
π
power.h
(2.34 KB)
π
priority.h
(4.39 KB)
π
priv.h
(19.73 KB)
π
prng.h
(354 B)
π
proc.h
(50.73 KB)
π
procctl.h
(4.89 KB)
π
procdesc.h
(4.46 KB)
π
procfs.h
(4.2 KB)
π
protosw.h
(14.56 KB)
π
ptio.h
(1.57 KB)
π
ptrace.h
(8.61 KB)
π
qmath.h
(22.07 KB)
π
queue.h
(28.61 KB)
π
racct.h
(7.48 KB)
π
random.h
(5.41 KB)
π
rangelock.h
(3.86 KB)
π
rangeset.h
(2.96 KB)
π
rctl.h
(5.91 KB)
π
reboot.h
(3.41 KB)
π
refcount.h
(5.72 KB)
π
regression.h
(1.62 KB)
π
resource.h
(5.32 KB)
π
resourcevar.h
(6.33 KB)
π
rman.h
(6.41 KB)
π
rmlock.h
(5.56 KB)
π
rtprio.h
(3.08 KB)
π
runq.h
(2.54 KB)
π
rwlock.h
(10.61 KB)
π
sbuf.h
(4.68 KB)
π
sched.h
(9.06 KB)
π
sdt.h
(17.89 KB)
π
select.h
(3.5 KB)
π
selinfo.h
(2.39 KB)
π
sem.h
(4.31 KB)
π
sema.h
(2.61 KB)
π
seqc.h
(3.26 KB)
π
serial.h
(3.49 KB)
π
sf_buf.h
(5.87 KB)
π
sglist.h
(3.89 KB)
π
shm.h
(5.69 KB)
π
sigio.h
(2.83 KB)
π
signal.h
(15.83 KB)
π
signalvar.h
(12.95 KB)
π
sleepqueue.h
(5.61 KB)
π
slicer.h
(2.19 KB)
π
smp.h
(8.88 KB)
π
smr.h
(7.64 KB)
π
smr_types.h
(4.87 KB)
π
snoop.h
(1014 B)
π
sockbuf.h
(9.9 KB)
π
socket.h
(23.43 KB)
π
socketvar.h
(18.75 KB)
π
sockio.h
(7.97 KB)
π
sockopt.h
(2.98 KB)
π
soundcard.h
(69.38 KB)
π
specialfd.h
(1.56 KB)
π
spigenio.h
(2.28 KB)
π
stack.h
(2.65 KB)
π
stat.h
(13.44 KB)
π
stats.h
(34.73 KB)
π
statvfs.h
(3.08 KB)
π
stdatomic.h
(13.94 KB)
π
stddef.h
(1.7 KB)
π
stdint.h
(2.63 KB)
π
sx.h
(11.04 KB)
π
syscall.h
(13.99 KB)
π
syscall.mk
(6.56 KB)
π
syscallsubr.h
(16.94 KB)
π
sysctl.h
(47.96 KB)
π
sysent.h
(10.82 KB)
π
syslimits.h
(3.14 KB)
π
syslog.h
(7.25 KB)
π
sysproto.h
(153.38 KB)
π
systm.h
(21.97 KB)
π
taskqueue.h
(7.65 KB)
π
terminal.h
(8.25 KB)
π
termios.h
(151 B)
π
thr.h
(2.87 KB)
π
tiio.h
(12.62 KB)
π
tim_filter.h
(4.61 KB)
π
time.h
(16.87 KB)
π
timeb.h
(2.59 KB)
π
timeet.h
(3.65 KB)
π
timeffc.h
(11.94 KB)
π
timepps.h
(6.48 KB)
π
timers.h
(3.56 KB)
π
times.h
(2.46 KB)
π
timespec.h
(2.4 KB)
π
timetc.h
(3.16 KB)
π
timex.h
(6.61 KB)
π
tree.h
(27.93 KB)
π
tslog.h
(2.3 KB)
π
tty.h
(8.98 KB)
π
ttycom.h
(6.48 KB)
π
ttydefaults.h
(3.92 KB)
π
ttydevsw.h
(5.28 KB)
π
ttydisc.h
(2.93 KB)
π
ttyhook.h
(3.98 KB)
π
ttyqueue.h
(5.26 KB)
π
turnstile.h
(4.83 KB)
π
types.h
(11.64 KB)
π
ucontext.h
(2.91 KB)
π
ucred.h
(5.4 KB)
π
uio.h
(4.15 KB)
π
umtx.h
(5.94 KB)
π
un.h
(2.96 KB)
π
unistd.h
(7.34 KB)
π
unpcb.h
(6.77 KB)
π
user.h
(21.58 KB)
π
utsname.h
(2.47 KB)
π
uuid.h
(3.17 KB)
π
vdso.h
(4.26 KB)
π
vmem.h
(4.91 KB)
π
vmmeter.h
(7.72 KB)
π
vnode.h
(40.87 KB)
π
vtoc.h
(89 B)
π
wait.h
(6.11 KB)
π
watchdog.h
(4.22 KB)
Editing: acl.h
/*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1999-2001 Robert N. M. Watson * Copyright (c) 2008 Edward Tomasz NapieraΕa <trasz@FreeBSD.org> * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ /* * Developed by the TrustedBSD Project. * Support for POSIX.1e and NFSv4 access control lists. */ #ifndef _SYS_ACL_H_ #define _SYS_ACL_H_ #include <sys/param.h> #include <sys/queue.h> #include <vm/uma.h> /* * POSIX.1e and NFSv4 ACL types and related constants. */ typedef uint32_t acl_tag_t; typedef uint32_t acl_perm_t; typedef uint16_t acl_entry_type_t; typedef uint16_t acl_flag_t; typedef int acl_type_t; typedef int *acl_permset_t; typedef uint16_t *acl_flagset_t; /* * With 254 entries, "struct acl_t_struct" is exactly one 4kB page big. * Note that with NFSv4 ACLs, the maximum number of ACL entries one * may set on file or directory is about half of ACL_MAX_ENTRIES. * * If you increase this, you might also need to increase * _ACL_T_ALIGNMENT_BITS in lib/libc/posix1e/acl_support.h. * * The maximum number of POSIX.1e ACLs is controlled * by OLDACL_MAX_ENTRIES. Changing that one will break binary * compatibility with pre-8.0 userland and change on-disk ACL layout. */ #define ACL_MAX_ENTRIES 254 #if defined(_KERNEL) || defined(_ACL_PRIVATE) #define POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM #define POSIX1E_ACL_ACCESS_EXTATTR_NAME "posix1e.acl_access" #define POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM #define POSIX1E_ACL_DEFAULT_EXTATTR_NAME "posix1e.acl_default" #define NFS4_ACL_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM #define NFS4_ACL_EXTATTR_NAME "nfs4.acl" #define OLDACL_MAX_ENTRIES 32 /* * "struct oldacl" is used in compatibility ACL syscalls and for on-disk * storage of POSIX.1e ACLs. */ typedef int oldacl_tag_t; typedef mode_t oldacl_perm_t; struct oldacl_entry { oldacl_tag_t ae_tag; uid_t ae_id; oldacl_perm_t ae_perm; }; typedef struct oldacl_entry *oldacl_entry_t; struct oldacl { int acl_cnt; struct oldacl_entry acl_entry[OLDACL_MAX_ENTRIES]; }; /* * Current "struct acl". */ struct acl_entry { acl_tag_t ae_tag; uid_t ae_id; acl_perm_t ae_perm; /* NFSv4 entry type, "allow" or "deny". Unused in POSIX.1e ACLs. */ acl_entry_type_t ae_entry_type; /* NFSv4 ACL inheritance. Unused in POSIX.1e ACLs. */ acl_flag_t ae_flags; }; typedef struct acl_entry *acl_entry_t; /* * Internal ACL structure, used in libc, kernel APIs and for on-disk * storage of NFSv4 ACLs. POSIX.1e ACLs use "struct oldacl" for on-disk * storage. */ struct acl { unsigned int acl_maxcnt; unsigned int acl_cnt; /* Will be required e.g. to implement NFSv4.1 ACL inheritance. */ int acl_spare[4]; struct acl_entry acl_entry[ACL_MAX_ENTRIES]; }; /* * ACL structure internal to libc. */ struct acl_t_struct { struct acl ats_acl; int ats_cur_entry; /* * ats_brand is for libc internal bookkeeping only. * Applications should use acl_get_brand_np(3). * Kernel code should use the "type" argument passed * to VOP_SETACL, VOP_GETACL or VOP_ACLCHECK calls; * ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT mean POSIX.1e * ACL, ACL_TYPE_NFS4 means NFSv4 ACL. */ int ats_brand; }; typedef struct acl_t_struct *acl_t; #else /* _KERNEL || _ACL_PRIVATE */ typedef void *acl_entry_t; typedef void *acl_t; #endif /* !_KERNEL && !_ACL_PRIVATE */ /* * Possible valid values for ats_brand field. */ #define ACL_BRAND_UNKNOWN 0 #define ACL_BRAND_POSIX 1 #define ACL_BRAND_NFS4 2 /* * Possible valid values for ae_tag field. For explanation, see acl(9). */ #define ACL_UNDEFINED_TAG 0x00000000 #define ACL_USER_OBJ 0x00000001 #define ACL_USER 0x00000002 #define ACL_GROUP_OBJ 0x00000004 #define ACL_GROUP 0x00000008 #define ACL_MASK 0x00000010 #define ACL_OTHER 0x00000020 #define ACL_OTHER_OBJ ACL_OTHER #define ACL_EVERYONE 0x00000040 /* * Possible valid values for ae_entry_type field, valid only for NFSv4 ACLs. */ #define ACL_ENTRY_TYPE_ALLOW 0x0100 #define ACL_ENTRY_TYPE_DENY 0x0200 #define ACL_ENTRY_TYPE_AUDIT 0x0400 #define ACL_ENTRY_TYPE_ALARM 0x0800 /* * Possible valid values for acl_type_t arguments. First two * are provided only for backwards binary compatibility. */ #define ACL_TYPE_ACCESS_OLD 0x00000000 #define ACL_TYPE_DEFAULT_OLD 0x00000001 #define ACL_TYPE_ACCESS 0x00000002 #define ACL_TYPE_DEFAULT 0x00000003 #define ACL_TYPE_NFS4 0x00000004 /* * Possible bits in ae_perm field for POSIX.1e ACLs. Note * that ACL_EXECUTE may be used in both NFSv4 and POSIX.1e ACLs. */ #define ACL_EXECUTE 0x0001 #define ACL_WRITE 0x0002 #define ACL_READ 0x0004 #define ACL_PERM_NONE 0x0000 #define ACL_PERM_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ) #define ACL_POSIX1E_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ) /* * Possible bits in ae_perm field for NFSv4 ACLs. */ #define ACL_READ_DATA 0x00000008 #define ACL_LIST_DIRECTORY 0x00000008 #define ACL_WRITE_DATA 0x00000010 #define ACL_ADD_FILE 0x00000010 #define ACL_APPEND_DATA 0x00000020 #define ACL_ADD_SUBDIRECTORY 0x00000020 #define ACL_READ_NAMED_ATTRS 0x00000040 #define ACL_WRITE_NAMED_ATTRS 0x00000080 /* ACL_EXECUTE is defined above. */ #define ACL_DELETE_CHILD 0x00000100 #define ACL_READ_ATTRIBUTES 0x00000200 #define ACL_WRITE_ATTRIBUTES 0x00000400 #define ACL_DELETE 0x00000800 #define ACL_READ_ACL 0x00001000 #define ACL_WRITE_ACL 0x00002000 #define ACL_WRITE_OWNER 0x00004000 #define ACL_SYNCHRONIZE 0x00008000 #define ACL_FULL_SET (ACL_READ_DATA | ACL_WRITE_DATA | \ ACL_APPEND_DATA | ACL_READ_NAMED_ATTRS | ACL_WRITE_NAMED_ATTRS | \ ACL_EXECUTE | ACL_DELETE_CHILD | ACL_READ_ATTRIBUTES | \ ACL_WRITE_ATTRIBUTES | ACL_DELETE | ACL_READ_ACL | ACL_WRITE_ACL | \ ACL_WRITE_OWNER | ACL_SYNCHRONIZE) #define ACL_MODIFY_SET (ACL_FULL_SET & \ ~(ACL_WRITE_ACL | ACL_WRITE_OWNER)) #define ACL_READ_SET (ACL_READ_DATA | ACL_READ_NAMED_ATTRS | \ ACL_READ_ATTRIBUTES | ACL_READ_ACL) #define ACL_WRITE_SET (ACL_WRITE_DATA | ACL_APPEND_DATA | \ ACL_WRITE_NAMED_ATTRS | ACL_WRITE_ATTRIBUTES) #define ACL_NFS4_PERM_BITS ACL_FULL_SET /* * Possible entry_id values for acl_get_entry(3). */ #define ACL_FIRST_ENTRY 0 #define ACL_NEXT_ENTRY 1 /* * Possible values in ae_flags field; valid only for NFSv4 ACLs. */ #define ACL_ENTRY_FILE_INHERIT 0x0001 #define ACL_ENTRY_DIRECTORY_INHERIT 0x0002 #define ACL_ENTRY_NO_PROPAGATE_INHERIT 0x0004 #define ACL_ENTRY_INHERIT_ONLY 0x0008 #define ACL_ENTRY_SUCCESSFUL_ACCESS 0x0010 #define ACL_ENTRY_FAILED_ACCESS 0x0020 #define ACL_ENTRY_INHERITED 0x0080 #define ACL_FLAGS_BITS (ACL_ENTRY_FILE_INHERIT | \ ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \ ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \ ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED) /* * Undefined value in ae_id field. ae_id should be set to this value * iff ae_tag is ACL_USER_OBJ, ACL_GROUP_OBJ, ACL_OTHER or ACL_EVERYONE. */ #define ACL_UNDEFINED_ID ((uid_t)-1) /* * Possible values for _flags parameter in acl_to_text_np(3). */ #define ACL_TEXT_VERBOSE 0x01 #define ACL_TEXT_NUMERIC_IDS 0x02 #define ACL_TEXT_APPEND_ID 0x04 /* * POSIX.1e ACLs are capable of expressing the read, write, and execute bits * of the POSIX mode field. We provide two masks: one that defines the bits * the ACL will replace in the mode, and the other that defines the bits that * must be preseved when an ACL is updating a mode. */ #define ACL_OVERRIDE_MASK (S_IRWXU | S_IRWXG | S_IRWXO) #define ACL_PRESERVE_MASK (~ACL_OVERRIDE_MASK) #ifdef _KERNEL /* * Filesystem-independent code to move back and forth between POSIX mode and * POSIX.1e ACL representations. */ acl_perm_t acl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode); struct acl_entry acl_posix1e_mode_to_entry(acl_tag_t tag, uid_t uid, gid_t gid, mode_t mode); mode_t acl_posix1e_perms_to_mode( struct acl_entry *acl_user_obj_entry, struct acl_entry *acl_group_obj_entry, struct acl_entry *acl_other_entry); mode_t acl_posix1e_acl_to_mode(struct acl *acl); mode_t acl_posix1e_newfilemode(mode_t cmode, struct acl *dacl); struct acl *acl_alloc(int flags); void acl_free(struct acl *aclp); void acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, int file_owner_id); void acl_nfs4_sync_mode_from_acl(mode_t *mode, const struct acl *aclp); int acl_nfs4_is_trivial(const struct acl *aclp, int file_owner_id); void acl_nfs4_compute_inherited_acl( const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, int is_directory); int acl_copy_oldacl_into_acl(const struct oldacl *source, struct acl *dest); int acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest); /* * To allocate 'struct acl', use acl_alloc()/acl_free() instead of this. */ MALLOC_DECLARE(M_ACL); /* * Filesystem-independent syntax check for a POSIX.1e ACL. */ int acl_posix1e_check(struct acl *acl); int acl_nfs4_check(const struct acl *aclp, int is_directory); #else /* !_KERNEL */ #if defined(_ACL_PRIVATE) /* * Syscall interface -- use the library calls instead as the syscalls have * strict ACL entry ordering requirements. */ __BEGIN_DECLS int __acl_aclcheck_fd(int _filedes, acl_type_t _type, struct acl *_aclp); int __acl_aclcheck_file(const char *_path, acl_type_t _type, struct acl *_aclp); int __acl_aclcheck_link(const char *_path, acl_type_t _type, struct acl *_aclp); int __acl_delete_fd(int _filedes, acl_type_t _type); int __acl_delete_file(const char *_path_p, acl_type_t _type); int __acl_delete_link(const char *_path_p, acl_type_t _type); int __acl_get_fd(int _filedes, acl_type_t _type, struct acl *_aclp); int __acl_get_file(const char *_path, acl_type_t _type, struct acl *_aclp); int __acl_get_link(const char *_path, acl_type_t _type, struct acl *_aclp); int __acl_set_fd(int _filedes, acl_type_t _type, struct acl *_aclp); int __acl_set_file(const char *_path, acl_type_t _type, struct acl *_aclp); int __acl_set_link(const char *_path, acl_type_t _type, struct acl *_aclp); __END_DECLS #endif /* _ACL_PRIVATE */ /* * Supported POSIX.1e ACL manipulation and assignment/retrieval API _np calls * are local extensions that reflect an environment capable of opening file * descriptors of directories, and allowing additional ACL type for different * filesystems (i.e., AFS). */ __BEGIN_DECLS int acl_add_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag); int acl_add_perm(acl_permset_t _permset_d, acl_perm_t _perm); int acl_calc_mask(acl_t *_acl_p); int acl_clear_flags_np(acl_flagset_t _flagset_d); int acl_clear_perms(acl_permset_t _permset_d); int acl_copy_entry(acl_entry_t _dest_d, acl_entry_t _src_d); ssize_t acl_copy_ext(void *_buf_p, acl_t _acl, ssize_t _size); acl_t acl_copy_int(const void *_buf_p); int acl_create_entry(acl_t *_acl_p, acl_entry_t *_entry_p); int acl_create_entry_np(acl_t *_acl_p, acl_entry_t *_entry_p, int _index); int acl_delete_entry(acl_t _acl, acl_entry_t _entry_d); int acl_delete_entry_np(acl_t _acl, int _index); int acl_delete_fd_np(int _filedes, acl_type_t _type); int acl_delete_file_np(const char *_path_p, acl_type_t _type); int acl_delete_link_np(const char *_path_p, acl_type_t _type); int acl_delete_def_file(const char *_path_p); int acl_delete_def_link_np(const char *_path_p); int acl_delete_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag); int acl_delete_perm(acl_permset_t _permset_d, acl_perm_t _perm); acl_t acl_dup(acl_t _acl); int acl_free(void *_obj_p); acl_t acl_from_text(const char *_buf_p); int acl_get_brand_np(acl_t _acl, int *_brand_p); int acl_get_entry(acl_t _acl, int _entry_id, acl_entry_t *_entry_p); acl_t acl_get_fd(int _fd); acl_t acl_get_fd_np(int fd, acl_type_t _type); acl_t acl_get_file(const char *_path_p, acl_type_t _type); int acl_get_entry_type_np(acl_entry_t _entry_d, acl_entry_type_t *_entry_type_p); acl_t acl_get_link_np(const char *_path_p, acl_type_t _type); void *acl_get_qualifier(acl_entry_t _entry_d); int acl_get_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag); int acl_get_perm_np(acl_permset_t _permset_d, acl_perm_t _perm); int acl_get_flagset_np(acl_entry_t _entry_d, acl_flagset_t *_flagset_p); int acl_get_permset(acl_entry_t _entry_d, acl_permset_t *_permset_p); int acl_get_tag_type(acl_entry_t _entry_d, acl_tag_t *_tag_type_p); acl_t acl_init(int _count); int acl_set_fd(int _fd, acl_t _acl); int acl_set_fd_np(int _fd, acl_t _acl, acl_type_t _type); int acl_set_file(const char *_path_p, acl_type_t _type, acl_t _acl); int acl_set_entry_type_np(acl_entry_t _entry_d, acl_entry_type_t _entry_type); int acl_set_link_np(const char *_path_p, acl_type_t _type, acl_t _acl); int acl_set_flagset_np(acl_entry_t _entry_d, acl_flagset_t _flagset_d); int acl_set_permset(acl_entry_t _entry_d, acl_permset_t _permset_d); int acl_set_qualifier(acl_entry_t _entry_d, const void *_tag_qualifier_p); int acl_set_tag_type(acl_entry_t _entry_d, acl_tag_t _tag_type); ssize_t acl_size(acl_t _acl); char *acl_to_text(acl_t _acl, ssize_t *_len_p); char *acl_to_text_np(acl_t _acl, ssize_t *_len_p, int _flags); int acl_valid(acl_t _acl); int acl_valid_fd_np(int _fd, acl_type_t _type, acl_t _acl); int acl_valid_file_np(const char *_path_p, acl_type_t _type, acl_t _acl); int acl_valid_link_np(const char *_path_p, acl_type_t _type, acl_t _acl); int acl_is_trivial_np(const acl_t _acl, int *_trivialp); acl_t acl_strip_np(const acl_t _acl, int recalculate_mask); __END_DECLS #endif /* !_KERNEL */ #endif /* !_SYS_ACL_H_ */
Upload File
Create Folder