xref: /illumos-gate/usr/src/uts/common/os/priv_defs (revision 672986541be54a7a471bb088e60780c37e371d7e)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 * Use is subject to license terms.
24 *
25INSERT COMMENT
26 */
27
28#pragma ident	"%Z%%M%	%I%	%E% SMI"
29
30#
31# Privileges can be added to this file at any location, not
32# necessarily at the end.  For patches, it is probably best to
33# add the new privilege at the end; for ordinary releases privileges
34# should be ordered alphabetically.
35#
36
37privilege PRIV_CONTRACT_EVENT
38
39	Allows a process to request critical events without limitation.
40	Allows a process to request reliable delivery of all events on
41	any event queue.
42
43privilege PRIV_CONTRACT_OBSERVER
44
45	Allows a process to observe contract events generated by
46	contracts created and owned by users other than the process's
47	effective user ID.
48	Allows a process to open contract event endpoints belonging to
49	contracts created and owned by users other than the process's
50	effective user ID.
51
52privilege PRIV_CPC_CPU
53
54	Allow a process to access per-CPU hardware performance counters.
55
56privilege PRIV_DTRACE_KERNEL
57
58	Allows DTrace kernel-level tracing.
59
60privilege PRIV_DTRACE_PROC
61
62	Allows DTrace process-level tracing.
63	Allows process-level tracing probes to be placed and enabled in
64	processes to which the user has permissions.
65
66privilege PRIV_DTRACE_USER
67
68	Allows DTrace user-level tracing.
69	Allows use of the syscall and profile DTrace providers to
70	examine processes to which the user has permissions.
71
72privilege PRIV_FILE_CHOWN
73
74	Allows a process to change a file's owner user ID.
75	Allows a process to change a file's group ID to one other than
76	the process' effective group ID or one of the process'
77	supplemental group IDs.
78
79privilege PRIV_FILE_CHOWN_SELF
80
81	Allows a process to give away its files; a process with this
82	privilege will run as if {_POSIX_CHOWN_RESTRICTED} is not
83	in effect.
84
85privilege PRIV_FILE_DAC_EXECUTE
86
87	Allows a process to execute an executable file whose permission
88	bits or ACL do not allow the process execute permission.
89
90privilege PRIV_FILE_DAC_READ
91
92	Allows a process to read a file or directory whose permission
93	bits or ACL do not allow the process read permission.
94
95privilege PRIV_FILE_DAC_SEARCH
96
97	Allows a process to search a directory whose permission bits or
98	ACL do not allow the process search permission.
99
100privilege PRIV_FILE_DAC_WRITE
101
102	Allows a process to write a file or directory whose permission
103	bits or ACL do not allow the process write permission.
104	In order to write files owned by uid 0 in the absence of an
105	effective uid of 0 ALL privileges are required.
106
107privilege PRIV_FILE_DOWNGRADE_SL
108
109	Allows a process to set the sensitivity label of a file or
110	directory to a sensitivity label that does not dominate the
111	existing sensitivity label.
112	This privilege is interpreted only if the system is configured
113	with Trusted Extensions.
114
115basic privilege PRIV_FILE_LINK_ANY
116
117	Allows a process to create hardlinks to files owned by a uid
118	different from the process' effective uid.
119
120privilege PRIV_FILE_OWNER
121
122	Allows a process which is not the owner of a file or directory
123	to perform the following operations that are normally permitted
124	only for the file owner: modify that file's access and
125	modification times; remove or rename a file or directory whose
126	parent directory has the ``save text image after execution''
127	(sticky) bit set; mount a ``namefs'' upon a file; modify
128	permission bits or ACL except for the set-uid and set-gid
129	bits.
130
131privilege PRIV_FILE_SETID
132
133	Allows a process to change the ownership of a file or write to
134	a file without the set-user-ID and set-group-ID bits being
135	cleared.
136	Allows a process to set the set-group-ID bit on a file or
137	directory whose group is not the process' effective group or
138	one of the process' supplemental groups.
139	Allows a process to set the set-user-ID bit on a file with
140	different ownership in the presence of PRIV_FILE_OWNER.
141	Additional restrictions apply when creating or modifying a
142	set-uid 0 file.
143
144privilege PRIV_FILE_UPGRADE_SL
145
146	Allows a process to set the sensitivity label of a file or
147	directory to a sensitivity label that dominates the existing
148	sensitivity label.
149	This privilege is interpreted only if the system is configured
150	with Trusted Extensions.
151
152privilege PRIV_GRAPHICS_ACCESS
153
154	Allows a process to make privileged ioctls to graphics devices.
155	Typically only xserver process needs to have this privilege.
156	A process with this privilege is also allowed to perform
157	privileged graphics device mappings.
158
159privilege PRIV_GRAPHICS_MAP
160
161	Allows a process to perform privileged mappings through a
162	graphics device.
163
164privilege PRIV_IPC_DAC_READ
165
166	Allows a process to read a System V IPC
167	Message Queue, Semaphore Set, or Shared Memory Segment whose
168	permission bits do not allow the process read permission.
169	Allows a process to read remote shared memory whose
170	permission bits do not allow the process read permission.
171
172privilege PRIV_IPC_DAC_WRITE
173
174	Allows a process to write a System V IPC
175	Message Queue, Semaphore Set, or Shared Memory Segment whose
176	permission bits do not allow the process write permission.
177	Allows a process to read remote shared memory whose
178	permission bits do not allow the process write permission.
179	Additional restrictions apply if the owner of the object has uid 0
180	and the effective uid of the current process is not 0.
181
182privilege PRIV_IPC_OWNER
183
184	Allows a process which is not the owner of a System
185	V IPC Message Queue, Semaphore Set, or Shared Memory Segment to
186	remove, change ownership of, or change permission bits of the
187	Message Queue, Semaphore Set, or Shared Memory Segment.
188	Additional restrictions apply if the owner of the object has uid 0
189	and the effective uid of the current process is not 0.
190
191privilege PRIV_NET_BINDMLP
192
193	Allow a process to bind to a port that is configured as a
194	multi-level port(MLP) for the process's zone. This privilege
195	applies to both shared address and zone-specific address MLPs.
196	See tnzonecfg(4) from the Trusted Extensions manual pages for
197	information on configuring MLP ports.
198	This privilege is interpreted only if the system is configured
199	with Trusted Extensions.
200
201privilege PRIV_NET_ICMPACCESS
202
203	Allows a process to send and receive ICMP packets.
204
205privilege PRIV_NET_MAC_AWARE
206
207	Allows a process to set NET_MAC_AWARE process flag by using
208	setpflags(2). This privilege also allows a process to set
209	SO_MAC_EXEMPT socket option by using setsockopt(3SOCKET).
210	The NET_MAC_AWARE process flag and the SO_MAC_EXEMPT socket
211	option both allow a local process to communicate with an
212	unlabeled peer if the local process' label dominates the
213	peer's default label, or if the local process runs in the
214	global zone.
215	This privilege is interpreted only if the system is configured
216	with Trusted Extensions.
217
218privilege PRIV_NET_PRIVADDR
219
220	Allows a process to bind to a privileged port
221	number. The privilege port numbers are 1-1023 (the traditional
222	UNIX privileged ports) as well as those ports marked as
223	"udp/tcp_extra_priv_ports" with the exception of the ports
224	reserved for use by NFS.
225
226privilege PRIV_NET_RAWACCESS
227
228	Allows a process to have direct access to the network layer.
229
230unsafe privilege PRIV_PROC_AUDIT
231
232	Allows a process to generate audit records.
233	Allows a process to get its own audit pre-selection information.
234
235privilege PRIV_PROC_CHROOT
236
237	Allows a process to change its root directory.
238
239privilege PRIV_PROC_CLOCK_HIGHRES
240
241	Allows a process to use high resolution timers.
242
243basic privilege PRIV_PROC_EXEC
244
245	Allows a process to call execve().
246
247basic privilege PRIV_PROC_FORK
248
249	Allows a process to call fork1()/forkall()/vfork()
250
251basic privilege PRIV_PROC_INFO
252
253	Allows a process to examine the status of processes other
254	than those it can send signals to.  Processes which cannot
255	be examined cannot be seen in /proc and appear not to exist.
256
257privilege PRIV_PROC_LOCK_MEMORY
258
259	Allows a process to lock pages in physical memory.
260
261privilege PRIV_PROC_OWNER
262
263	Allows a process to send signals to other processes, inspect
264	and modify process state to other processes regardless of
265	ownership.  When modifying another process, additional
266	restrictions apply:  the effective privilege set of the
267	attaching process must be a superset of the target process'
268	effective, permitted and inheritable sets; the limit set must
269	be a superset of the target's limit set; if the target process
270	has any uid set to 0 all privilege must be asserted unless the
271	effective uid is 0.
272	Allows a process to bind arbitrary processes to CPUs.
273
274privilege PRIV_PROC_PRIOCNTL
275
276	Allows a process to elevate its priority above its current level.
277	Allows a process to change its scheduling class to any scheduling class,
278	including the RT class.
279
280basic privilege PRIV_PROC_SESSION
281
282	Allows a process to send signals or trace processes outside its
283	session.
284
285unsafe privilege PRIV_PROC_SETID
286
287	Allows a process to set its uids at will.
288	Assuming uid 0 requires all privileges to be asserted.
289
290privilege PRIV_PROC_TASKID
291
292	Allows a process to assign a new task ID to the calling process.
293
294privilege PRIV_PROC_ZONE
295
296	Allows a process to trace or send signals to processes in
297	other zones.
298
299privilege PRIV_SYS_ACCT
300
301	Allows a process to enable and disable and manage accounting through
302	acct(2), getacct(2), putacct(2) and wracct(2).
303
304privilege PRIV_SYS_ADMIN
305
306	Allows a process to perform system administration tasks such
307	as setting node and domain name and specifying nscd and coreadm
308	settings.
309
310privilege PRIV_SYS_AUDIT
311
312	Allows a process to start the (kernel) audit daemon.
313	Allows a process to view and set audit state (audit user ID,
314	audit terminal ID, audit sessions ID, audit pre-selection mask).
315	Allows a process to turn off and on auditing.
316	Allows a process to configure the audit parameters (cache and
317	queue sizes, event to class mappings, policy options).
318
319privilege PRIV_SYS_CONFIG
320
321	Allows a process to perform various system configuration tasks.
322	Allows a process to add and remove swap devices; when adding a swap
323	device, a process must also have sufficient privileges to read from
324	and write to the swap device.
325
326privilege PRIV_SYS_DEVICES
327
328	Allows a process to successfully call a kernel module that
329	calls the kernel drv_priv(9F) function to check for allowed
330	access.
331	Allows a process to open the real console device directly.
332	Allows a process to open devices that have been exclusively opened.
333
334privilege PRIV_SYS_IPC_CONFIG
335
336	Allows a process to increase the size of a System V IPC Message
337	Queue buffer.
338
339privilege PRIV_SYS_LINKDIR
340
341	Allows a process to unlink and link directories.
342
343privilege PRIV_SYS_MOUNT
344
345	Allows filesystem specific administrative procedures, such as
346	filesystem configuration ioctls, quota calls and creation/deletion
347	of snapshots.
348	Allows a process to mount and unmount filesystems which would
349	otherwise be restricted (i.e., most filesystems except
350	namefs).
351	A process performing a mount operation needs to have
352	appropriate access to the device being mounted (read-write for
353	"rw" mounts, read for "ro" mounts).
354	A process performing any of the aforementioned
355	filesystem operations needs to have read/write/owner
356	access to the mount point.
357	Only regular files and directories can serve as mount points
358	for processes which do not have all zone privileges asserted.
359	Unless a process has all zone privileges, the mount(2)
360	system call will force the "nosuid" and "restrict" options, the
361	latter only for autofs mountpoints.
362	Regardless of privileges, a process running in a non-global zone may
363	only control mounts performed from within said zone.
364	Outside the global zone, the "nodevices" option is always forced.
365
366privilege PRIV_SYS_IP_CONFIG
367
368	Allows a process to configure a system's network interfaces and routes.
369	Allows a process to configure network parameters using ndd.
370	Allows a process access to otherwise restricted information using ndd.
371	Allows a process to configure IPsec.
372	Allows a process to pop anchored STREAMs modules with matching zoneid.
373
374privilege PRIV_SYS_NET_CONFIG
375
376	Allows all that PRIV_SYS_IP_CONFIG allows.
377	Allows a process to push the rpcmod STREAMs module.
378	Allows a process to INSERT/REMOVE STREAMs modules on locations other
379	than the top of the module stack.
380
381privilege PRIV_SYS_NFS
382
383	Allows a process to perform Sun private NFS specific system calls.
384	Allows a process to bind to ports reserved by NFS: ports 2049 (nfs)
385	and port 4045 (lockd).
386
387privilege PRIV_SYS_RES_CONFIG
388
389	Allows a process to create and delete processor sets, assign
390	CPUs to processor sets and override the PSET_NOESCAPE property.
391	Allows a process to change the operational status of CPUs in
392	the system using p_online(2).
393	Allows a process to configure resource pools and to bind
394	processes to pools
395
396unsafe privilege PRIV_SYS_RESOURCE
397
398	Allows a process to modify the resource limits specified
399	by setrlimit(2) and setrctl(2) without restriction.
400	Allows a process to exceed the per-user maximum number of
401	processes.
402	Allows a process to extend or create files on a filesystem that
403	has less than minfree space in reserve.
404
405privilege PRIV_SYS_SUSER_COMPAT
406
407	Allows a process to successfully call a third party loadable module
408	that calls the kernel suser() function to check for allowed access.
409	This privilege exists only for third party loadable module
410	compatibility and is not used by Solaris proper.
411
412privilege PRIV_SYS_TIME
413
414	Allows a process to manipulate system time using any of the
415	appropriate system calls: stime, adjtime, ntp_adjtime and
416	the IA specific RTC calls.
417
418privilege PRIV_SYS_TRANS_LABEL
419
420	Allows a process to translate labels that are not dominated
421	by the process' sensitivity label to and from an external
422	string form.
423	This privilege is interpreted only if the system is configured
424	with Trusted Extensions.
425
426privilege PRIV_WIN_COLORMAP
427
428	Allows a process to override colormap restrictions.
429        Allows a process to install or remove colormaps.
430        Allows a process to retrieve colormap cell entries allocated
431	by other processes.
432	This privilege is interpreted only if the system is configured
433	with Trusted Extensions.
434
435privilege PRIV_WIN_CONFIG
436
437	Allows a process to configure or destroy resources that are
438	permanently retained by the X server.
439        Allows a process to use SetScreenSaver to set the screen
440	saver timeout value.
441        Allows a process to use ChangeHosts to modify the display
442	access control list.
443        Allows a process to use GrabServer.
444        Allows a process to use the SetCloseDownMode request which
445	may retain window, pixmap, colormap, property, cursor, font,
446	or graphic context resources.
447	This privilege is interpreted only if the system is configured
448	with Trusted Extensions.
449
450privilege PRIV_WIN_DAC_READ
451
452	Allows a process to read from a window resource that it does
453	not own (has a different user ID).
454	This privilege is interpreted only if the system is configured
455	with Trusted Extensions.
456
457privilege PRIV_WIN_DAC_WRITE
458
459	Allows a process to write to or create a window resource that
460	it does not own (has a different user ID). A newly created
461	window property is created with the window's user ID.
462	This privilege is interpreted only if the system is configured
463	with Trusted Extensions.
464
465privilege PRIV_WIN_DEVICES
466
467	Allows a process to perform operations on window input devices.
468        Allows a process to get and set keyboard and pointer controls.
469        Allows a process to modify pointer button and key mappings.
470	This privilege is interpreted only if the system is configured
471	with Trusted Extensions.
472
473privilege PRIV_WIN_DGA
474
475	Allows a process to use the direct graphics access (DGA) X protocol
476	extensions. Direct process access to the frame buffer is still
477	required. Thus the process must have MAC and DAC privileges that
478	allow access to the frame buffer, or the frame buffer must be
479        allocated to the process.
480	This privilege is interpreted only if the system is configured
481	with Trusted Extensions.
482
483privilege PRIV_WIN_DOWNGRADE_SL
484
485	Allows a process to set the sensitivity label of a window resource
486	to a sensitivity label that does not dominate the existing
487	sensitivity label.
488	This privilege is interpreted only if the system is configured
489	with Trusted Extensions.
490
491privilege PRIV_WIN_FONTPATH
492
493	Allows a process to set a font path.
494	This privilege is interpreted only if the system is configured
495	with Trusted Extensions.
496
497privilege PRIV_WIN_MAC_READ
498
499	Allows a process to read from a window resource whose sensitivity
500	label is not equal to the process sensitivity label.
501	This privilege is interpreted only if the system is configured
502	with Trusted Extensions.
503
504privilege PRIV_WIN_MAC_WRITE
505
506	Allows a process to create a window resource whose sensitivity
507	label is not equal to the process sensitivity label.
508	A newly created window property is created with the window's
509	sensitivity label.
510	This privilege is interpreted only if the system is configured
511	with Trusted Extensions.
512
513privilege PRIV_WIN_SELECTION
514
515	Allows a process to request inter-window data moves without the
516	intervention of the selection confirmer.
517	This privilege is interpreted only if the system is configured
518	with Trusted Extensions.
519
520privilege PRIV_WIN_UPGRADE_SL
521
522	Allows a process to set the sensitivity label of a window
523	resource to a sensitivity label that dominates the existing
524	sensitivity label.
525	This privilege is interpreted only if the system is configured
526	with Trusted Extensions.
527
528set PRIV_EFFECTIVE
529
530	Set of privileges currently in effect.
531
532set PRIV_INHERITABLE
533
534	Set of privileges that comes into effect on exec.
535
536set PRIV_PERMITTED
537
538	Set of privileges that can be put into the effective set without
539	restriction.
540
541set PRIV_LIMIT
542
543	Set of privileges that determines the absolute upper bound of
544	privileges this process and its off-spring can obtain.
545