xref: /freebsd/sys/bsm/audit_fcntl.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1fe693990SRobert Watson /*-
2*51369649SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*51369649SPedro F. Giffuni  *
4fe693990SRobert Watson  * Copyright (c) 2009 Apple Inc.
5fe693990SRobert Watson  * All rights reserved.
6fe693990SRobert Watson  *
7fe693990SRobert Watson  * Redistribution and use in source and binary forms, with or without
8fe693990SRobert Watson  * modification, are permitted provided that the following conditions
9fe693990SRobert Watson  * are met:
10fe693990SRobert Watson  * 1.  Redistributions of source code must retain the above copyright
11fe693990SRobert Watson  *     notice, this list of conditions and the following disclaimer.
12fe693990SRobert Watson  * 2.  Redistributions in binary form must reproduce the above copyright
13fe693990SRobert Watson  *     notice, this list of conditions and the following disclaimer in the
14fe693990SRobert Watson  *     documentation and/or other materials provided with the distribution.
15fe693990SRobert Watson  * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
16fe693990SRobert Watson  *     its contributors may be used to endorse or promote products derived
17fe693990SRobert Watson  *     from this software without specific prior written permission.
18fe693990SRobert Watson  *
19fe693990SRobert Watson  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
20fe693990SRobert Watson  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21fe693990SRobert Watson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22fe693990SRobert Watson  * ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
23fe693990SRobert Watson  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24fe693990SRobert Watson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25fe693990SRobert Watson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26fe693990SRobert Watson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27fe693990SRobert Watson  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28fe693990SRobert Watson  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29fe693990SRobert Watson  * POSSIBILITY OF SUCH DAMAGE.
30fe693990SRobert Watson  */
31fe693990SRobert Watson 
32fe693990SRobert Watson #ifndef	_BSM_AUDIT_FCNTL_H_
33fe693990SRobert Watson #define	_BSM_AUDIT_FCNTL_H_
34fe693990SRobert Watson 
35fe693990SRobert Watson /*
36fe693990SRobert Watson  * Shared and Solaris-specific: (0-99).
37fe693990SRobert Watson  */
38fe693990SRobert Watson #define	BSM_F_DUPFD		0
39fe693990SRobert Watson #define	BSM_F_GETFD		1
40fe693990SRobert Watson #define	BSM_F_SETFD		2
41fe693990SRobert Watson #define	BSM_F_GETFL		3
42fe693990SRobert Watson #define	BSM_F_SETFL		4
43fe693990SRobert Watson #define	BSM_F_O_GETLK		5	/* Solaris-specific. */
44fe693990SRobert Watson #define	BSM_F_SETLK		6
45fe693990SRobert Watson #define	BSM_F_SETLKW		7
46fe693990SRobert Watson #define	BSM_F_CHKFL		8	/* Solaris-specific. */
47fe693990SRobert Watson #define	BSM_F_DUP2FD		9	/* FreeBSD/Solaris-specific. */
48fe693990SRobert Watson #define	BSM_F_ALLOCSP		10	/* Solaris-specific. */
49fe693990SRobert Watson #define	BSM_F_FREESP		11	/* Solaris-specific. */
50fe693990SRobert Watson 
51fe693990SRobert Watson #define	BSM_F_ISSTREAM		13	/* Solaris-specific. */
52fe693990SRobert Watson #define	BSM_F_GETLK		14
53fe693990SRobert Watson #define	BSM_F_PRIV		15	/* Solaris-specific. */
54fe693990SRobert Watson #define	BSM_F_NPRIV		16	/* Solaris-specific. */
55fe693990SRobert Watson #define	BSM_F_QUOTACTL		17	/* Solaris-specific. */
56fe693990SRobert Watson #define	BSM_F_BLOCKS		18	/* Solaris-specific. */
57fe693990SRobert Watson #define	BSM_F_BLKSIZE		19	/* Solaris-specific. */
58fe693990SRobert Watson 
59fe693990SRobert Watson #define	BSM_F_GETOWN		23
60fe693990SRobert Watson #define	BSM_F_SETOWN		24
61fe693990SRobert Watson #define	BSM_F_REVOKE		25	/* Solaris-specific. */
62fe693990SRobert Watson #define	BSM_F_HASREMOTELOCKS	26	/* Solaris-specific. */
63fe693990SRobert Watson #define	BSM_F_FREESP64		27	/* Solaris-specific. */
64fe693990SRobert Watson #define	BSM_F_ALLOCSP64		28	/* Solaris-specific. */
65fe693990SRobert Watson 
66fe693990SRobert Watson #define	BSM_F_GETLK64		33	/* Solaris-specific. */
67fe693990SRobert Watson #define	BSM_F_SETLK64		34	/* Solaris-specific. */
68fe693990SRobert Watson #define	BSM_F_SETLKW64		35	/* Solaris-specific. */
69fe693990SRobert Watson 
70fe693990SRobert Watson #define	BSM_F_SHARE		40	/* Solaris-specific. */
71fe693990SRobert Watson #define	BSM_F_UNSHARE		41 	/* Solaris-specific. */
72fe693990SRobert Watson #define	BSM_F_SETLK_NBMAND	42	/* Solaris-specific. */
73fe693990SRobert Watson #define	BSM_F_SHARE_NBMAND	43	/* Solaris-specific. */
74fe693990SRobert Watson #define	BSM_F_SETLK64_NBMAND	44 	/* Solaris-specific. */
75fe693990SRobert Watson #define	BSM_F_GETXFL		45	/* Solaris-specific. */
76fe693990SRobert Watson #define	BSM_F_BADFD		46	/* Solaris-specific. */
77fe693990SRobert Watson 
78fe693990SRobert Watson /*
79fe693990SRobert Watson  * FreeBSD-specific (100-199).
80fe693990SRobert Watson  */
81fe693990SRobert Watson #define	BSM_F_OGETLK		107	/* FreeBSD-specific. */
82fe693990SRobert Watson #define	BSM_F_OSETLK		108	/* FreeBSD-specific. */
83fe693990SRobert Watson #define	BSM_F_OSETLKW		109	/* FreeBSD-specific. */
84fe693990SRobert Watson 
85fe693990SRobert Watson #define	BSM_F_SETLK_REMOTE	114	/* FreeBSD-specific. */
86fe693990SRobert Watson 
87fe693990SRobert Watson /*
88fe693990SRobert Watson  * Linux-specific (200-299).
89fe693990SRobert Watson  */
90fe693990SRobert Watson #define	BSM_F_SETSIG		210	/* Linux-specific. */
91fe693990SRobert Watson #define	BSM_F_GETSIG		211	/* Linux-specific. */
92fe693990SRobert Watson 
93fe693990SRobert Watson /*
94fe693990SRobert Watson  * Darwin-specific (300-399).
95fe693990SRobert Watson  */
96fe693990SRobert Watson #define	BSM_F_CHKCLEAN 		341	/* Darwin-specific. */
97fe693990SRobert Watson #define	BSM_F_PREALLOCATE	342	/* Darwin-specific. */
98fe693990SRobert Watson #define	BSM_F_SETSIZE		343	/* Darwin-specific. */
99fe693990SRobert Watson #define	BSM_F_RDADVISE		344	/* Darwin-specific. */
100fe693990SRobert Watson #define	BSM_F_RDAHEAD		345	/* Darwin-specific. */
101fe693990SRobert Watson #define	BSM_F_READBOOTSTRAP	346	/* Darwin-specific. */
102fe693990SRobert Watson #define	BSM_F_WRITEBOOTSTRAP	347	/* Darwin-specific. */
103fe693990SRobert Watson #define	BSM_F_NOCACHE		348	/* Darwin-specific. */
104fe693990SRobert Watson #define	BSM_F_LOG2PHYS		349	/* Darwin-specific. */
105fe693990SRobert Watson #define	BSM_F_GETPATH		350	/* Darwin-specific. */
106fe693990SRobert Watson #define	BSM_F_FULLFSYNC		351	/* Darwin-specific. */
107fe693990SRobert Watson #define	BSM_F_PATHPKG_CHECK	352	/* Darwin-specific. */
108fe693990SRobert Watson #define	BSM_F_FREEZE_FS		353	/* Darwin-specific. */
109fe693990SRobert Watson #define	BSM_F_THAW_FS		354	/* Darwin-specific. */
110fe693990SRobert Watson #define	BSM_F_GLOBAL_NOCACHE	355	/* Darwin-specific. */
111fe693990SRobert Watson #define	BSM_F_OPENFROM		356	/* Darwin-specific. */
112fe693990SRobert Watson #define	BSM_F_UNLINKFROM	357	/* Darwin-specific. */
113fe693990SRobert Watson #define	BSM_F_CHECK_OPENEVT	358	/* Darwin-specific. */
114fe693990SRobert Watson #define	BSM_F_ADDSIGS		359	/* Darwin-specific. */
115fe693990SRobert Watson #define	BSM_F_MARKDEPENDENCY	360	/* Darwin-specific. */
116fe693990SRobert Watson 
117fe693990SRobert Watson /*
118fe693990SRobert Watson  * Darwin file system specific (400-499).
119fe693990SRobert Watson  */
120fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_0	400	/* Darwin-fs-specific. */
121fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_1	401	/* Darwin-fs-specific. */
122fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_2	402	/* Darwin-fs-specific. */
123fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_3	403	/* Darwin-fs-specific. */
124fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_4	404	/* Darwin-fs-specific. */
125fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_5	405	/* Darwin-fs-specific. */
126fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_6	406	/* Darwin-fs-specific. */
127fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_7	407	/* Darwin-fs-specific. */
128fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_8	408	/* Darwin-fs-specific. */
129fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_9	409	/* Darwin-fs-specific. */
130fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_10	410	/* Darwin-fs-specific. */
131fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_11	411	/* Darwin-fs-specific. */
132fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_12	412	/* Darwin-fs-specific. */
133fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_13	413	/* Darwin-fs-specific. */
134fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_14	414	/* Darwin-fs-specific. */
135fe693990SRobert Watson #define	BSM_F_FS_SPECIFIC_15	415	/* Darwin-fs-specific. */
136fe693990SRobert Watson 
137fe693990SRobert Watson 
138fe693990SRobert Watson #define	BSM_F_UNKNOWN		0xFFFF
139fe693990SRobert Watson 
140fe693990SRobert Watson #endif /* !_BSM_AUDIT_FCNTL_H_ */
141