xref: /illumos-gate/usr/src/uts/common/os/priv_defs (revision 7c70629e029d553bf3c4b18894d5fe1b224f420d)
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 2006 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_NET_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 push the rpcmod STREAMs module.
372	Allows a process to pop anchored STREAMs modules.
373	Allows a process to INSERT/REMOVE STREAMs modules on locations other
374	than the top of the module stack.
375	Allows a process to configure IPsec.
376
377privilege PRIV_SYS_NFS
378
379	Allows a process to perform Sun private NFS specific system calls.
380	Allows a process to bind to ports reserved by NFS: ports 2049 (nfs)
381	and port 4045 (lockd).
382
383privilege PRIV_SYS_RES_CONFIG
384
385	Allows a process to create and delete processor sets, assign
386	CPUs to processor sets and override the PSET_NOESCAPE property.
387	Allows a process to change the operational status of CPUs in
388	the system using p_online(2).
389	Allows a process to configure resource pools and to bind
390	processes to pools
391
392unsafe privilege PRIV_SYS_RESOURCE
393
394	Allows a process to modify the resource limits specified
395	by setrlimit(2) and setrctl(2) without restriction.
396	Allows a process to exceed the per-user maximum number of
397	processes.
398	Allows a process to extend or create files on a filesystem that
399	has less than minfree space in reserve.
400
401privilege PRIV_SYS_SUSER_COMPAT
402
403	Allows a process to successfully call a third party loadable module
404	that calls the kernel suser() function to check for allowed access.
405	This privilege exists only for third party loadable module
406	compatibility and is not used by Solaris proper.
407
408privilege PRIV_SYS_TIME
409
410	Allows a process to manipulate system time using any of the
411	appropriate system calls: stime, adjtime, ntp_adjtime and
412	the IA specific RTC calls.
413
414privilege PRIV_SYS_TRANS_LABEL
415
416	Allows a process to translate labels that are not dominated
417	by the process' sensitivity label to and from an external
418	string form.
419	This privilege is interpreted only if the system is configured
420	with Trusted Extensions.
421
422privilege PRIV_WIN_COLORMAP
423
424	Allows a process to override colormap restrictions.
425        Allows a process to install or remove colormaps.
426        Allows a process to retrieve colormap cell entries allocated
427	by other processes.
428	This privilege is interpreted only if the system is configured
429	with Trusted Extensions.
430
431privilege PRIV_WIN_CONFIG
432
433	Allows a process to configure or destroy resources that are
434	permanently retained by the X server.
435        Allows a process to use SetScreenSaver to set the screen
436	saver timeout value.
437        Allows a process to use ChangeHosts to modify the display
438	access control list.
439        Allows a process to use GrabServer.
440        Allows a process to use the SetCloseDownMode request which
441	may retain window, pixmap, colormap, property, cursor, font,
442	or graphic context resources.
443	This privilege is interpreted only if the system is configured
444	with Trusted Extensions.
445
446privilege PRIV_WIN_DAC_READ
447
448	Allows a process to read from a window resource that it does
449	not own (has a different user ID).
450	This privilege is interpreted only if the system is configured
451	with Trusted Extensions.
452
453privilege PRIV_WIN_DAC_WRITE
454
455	Allows a process to write to or create a window resource that
456	it does not own (has a different user ID). A newly created
457	window property is created with the window's user ID.
458	This privilege is interpreted only if the system is configured
459	with Trusted Extensions.
460
461privilege PRIV_WIN_DEVICES
462
463	Allows a process to perform operations on window input devices.
464        Allows a process to get and set keyboard and pointer controls.
465        Allows a process to modify pointer button and key mappings.
466	This privilege is interpreted only if the system is configured
467	with Trusted Extensions.
468
469privilege PRIV_WIN_DGA
470
471	Allows a process to use the direct graphics access (DGA) X protocol
472	extensions. Direct process access to the frame buffer is still
473	required. Thus the process must have MAC and DAC privileges that
474	allow access to the frame buffer, or the frame buffer must be
475        allocated to the process.
476	This privilege is interpreted only if the system is configured
477	with Trusted Extensions.
478
479privilege PRIV_WIN_DOWNGRADE_SL
480
481	Allows a process to set the sensitivity label of a window resource
482	to a sensitivity label that does not dominate the existing
483	sensitivity label.
484	This privilege is interpreted only if the system is configured
485	with Trusted Extensions.
486
487privilege PRIV_WIN_FONTPATH
488
489	Allows a process to set a font path.
490	This privilege is interpreted only if the system is configured
491	with Trusted Extensions.
492
493privilege PRIV_WIN_MAC_READ
494
495	Allows a process to read from a window resource whose sensitivity
496	label is not equal to the process sensitivity label.
497	This privilege is interpreted only if the system is configured
498	with Trusted Extensions.
499
500privilege PRIV_WIN_MAC_WRITE
501
502	Allows a process to create a window resource whose sensitivity
503	label is not equal to the process sensitivity label.
504	A newly created window property is created with the window's
505	sensitivity label.
506	This privilege is interpreted only if the system is configured
507	with Trusted Extensions.
508
509privilege PRIV_WIN_SELECTION
510
511	Allows a process to request inter-window data moves without the
512	intervention of the selection confirmer.
513	This privilege is interpreted only if the system is configured
514	with Trusted Extensions.
515
516privilege PRIV_WIN_UPGRADE_SL
517
518	Allows a process to set the sensitivity label of a window
519	resource to a sensitivity label that dominates the existing
520	sensitivity label.
521	This privilege is interpreted only if the system is configured
522	with Trusted Extensions.
523
524set PRIV_EFFECTIVE
525
526	Set of privileges currently in effect.
527
528set PRIV_INHERITABLE
529
530	Set of privileges that comes into effect on exec.
531
532set PRIV_PERMITTED
533
534	Set of privileges that can be put into the effective set without
535	restriction.
536
537set PRIV_LIMIT
538
539	Set of privileges that determines the absolute upper bound of
540	privileges this process and its off-spring can obtain.
541