1 '\" te
   2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright 2013, Joyent, Inc. All Rights Reserved.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   5 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
   6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH PRIVILEGES 5 "Feb 3, 2015"
   8 .SH NAME
   9 privileges \- process privilege model
  10 .SH DESCRIPTION
  11 .LP
  12 Solaris software implements a set of privileges that provide fine-grained
  13 control over the actions of processes. The possession of a certain privilege
  14 allows a process to perform a specific set of restricted operations.
  15 .sp
  16 .LP
  17 The change to a primarily privilege-based security model in the Solaris
  18 operating system gives developers an opportunity to restrict processes to those
  19 privileged operations actually needed instead of all (super-user) or no
  20 privileges (non-zero UIDs). Additionally, a set of previously unrestricted
  21 operations now requires a privilege; these privileges are dubbed the "basic"
  22 privileges and are by default given to all processes.
  23 .sp
  24 .LP
  25 Taken together, all defined privileges with the exception of the "basic"
  26 privileges compose the set of privileges that are traditionally associated with
  27 the root user. The "basic" privileges are "privileges" unprivileged processes
  28 were accustomed to having.
  29 .sp
  30 .LP
  31 The defined privileges are:
  32 .sp
  33 .ne 2
  34 .na
  35 \fB\fBPRIV_CONTRACT_EVENT\fR\fR
  36 .ad
  37 .sp .6
  38 .RS 4n
  39 Allow a process to request reliable delivery of events to an event endpoint.
  40 .sp
  41 Allow a process to include events in the critical event set term of a template
  42 which could be generated in volume by the user.
  43 .RE
  44 
  45 .sp
  46 .ne 2
  47 .na
  48 \fB\fBPRIV_CONTRACT_IDENTITY\fR\fR
  49 .ad
  50 .sp .6
  51 .RS 4n
  52 Allows a process to set the service FMRI value of a process contract template.
  53 .RE
  54 
  55 .sp
  56 .ne 2
  57 .na
  58 \fB\fBPRIV_CONTRACT_OBSERVER\fR\fR
  59 .ad
  60 .sp .6
  61 .RS 4n
  62 Allow a process to observe contract events generated by contracts created and
  63 owned by users other than the process's effective user ID.
  64 .sp
  65 Allow a process to open contract event endpoints belonging to contracts created
  66 and owned by users other than the process's effective user ID.
  67 .RE
  68 
  69 .sp
  70 .ne 2
  71 .na
  72 \fB\fBPRIV_CPC_CPU\fR\fR
  73 .ad
  74 .sp .6
  75 .RS 4n
  76 Allow a process to access per-CPU hardware performance counters.
  77 .RE
  78 
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fBPRIV_DTRACE_KERNEL\fR\fR
  83 .ad
  84 .sp .6
  85 .RS 4n
  86 Allow DTrace kernel-level tracing.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fB\fBPRIV_DTRACE_PROC\fR\fR
  93 .ad
  94 .sp .6
  95 .RS 4n
  96 Allow DTrace process-level tracing. Allow process-level tracing probes to be
  97 placed and enabled in processes to which the user has permissions.
  98 .RE
  99 
 100 .sp
 101 .ne 2
 102 .na
 103 \fB\fBPRIV_DTRACE_USER\fR\fR
 104 .ad
 105 .sp .6
 106 .RS 4n
 107 Allow DTrace user-level tracing. Allow use of the syscall and profile DTrace
 108 providers to examine processes to which the user has permissions.
 109 .RE
 110 
 111 .sp
 112 .ne 2
 113 .na
 114 \fB\fBPRIV_FILE_CHOWN\fR\fR
 115 .ad
 116 .sp .6
 117 .RS 4n
 118 Allow a process to change a file's owner user ID. Allow a process to change a
 119 file's group ID to one other than the process's effective group ID or one of
 120 the process's supplemental group IDs.
 121 .RE
 122 
 123 .sp
 124 .ne 2
 125 .na
 126 \fB\fBPRIV_FILE_CHOWN_SELF\fR\fR
 127 .ad
 128 .sp .6
 129 .RS 4n
 130 Allow a process to give away its files. A process with this privilege runs as
 131 if {\fB_POSIX_CHOWN_RESTRICTED\fR} is not in effect.
 132 .RE
 133 
 134 .sp
 135 .ne 2
 136 .na
 137 \fB\fBPRIV_FILE_DAC_EXECUTE\fR\fR
 138 .ad
 139 .sp .6
 140 .RS 4n
 141 Allow a process to execute an executable file whose permission bits or ACL
 142 would otherwise disallow the process execute permission.
 143 .RE
 144 
 145 .sp
 146 .ne 2
 147 .na
 148 \fB\fBPRIV_FILE_DAC_READ\fR\fR
 149 .ad
 150 .sp .6
 151 .RS 4n
 152 Allow a process to read a file or directory whose permission bits or ACL would
 153 otherwise disallow the process read permission.
 154 .RE
 155 
 156 .sp
 157 .ne 2
 158 .na
 159 \fB\fBPRIV_FILE_DAC_SEARCH\fR\fR
 160 .ad
 161 .sp .6
 162 .RS 4n
 163 Allow a process to search a directory whose permission bits or ACL would not
 164 otherwise allow the process search permission.
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fBPRIV_FILE_DAC_WRITE\fR\fR
 171 .ad
 172 .sp .6
 173 .RS 4n
 174 Allow a process to write a file or directory whose permission bits or ACL do
 175 not allow the process write permission. All privileges are required to write
 176 files owned by UID 0 in the absence of an effective UID of 0.
 177 .RE
 178 
 179 .sp
 180 .ne 2
 181 .na
 182 \fB\fBPRIV_FILE_DOWNGRADE_SL\fR\fR
 183 .ad
 184 .sp .6
 185 .RS 4n
 186 Allow a process to set the sensitivity label of a file or directory to a
 187 sensitivity label that does not dominate the existing sensitivity label.
 188 .sp
 189 This privilege is interpreted only if the system is configured with Trusted
 190 Extensions.
 191 .RE
 192 
 193 .sp
 194 .ne 2
 195 .na
 196 \fB\fBPRIV_FILE_FLAG_SET\fR\fR
 197 .ad
 198 .sp .6
 199 .RS 4n
 200 Allows a process to set immutable, nounlink or appendonly file attributes.
 201 .RE
 202 
 203 .sp
 204 .ne 2
 205 .na
 206 \fB\fBPRIV_FILE_LINK_ANY\fR\fR
 207 .ad
 208 .sp .6
 209 .RS 4n
 210 Allow a process to create hardlinks to files owned by a UID different from the
 211 process's effective UID.
 212 .RE
 213 
 214 .sp
 215 .ne 2
 216 .na
 217 \fB\fBPRIV_FILE_OWNER\fR\fR
 218 .ad
 219 .sp .6
 220 .RS 4n
 221 Allow a process that is not the owner of a file to modify that file's access
 222 and modification times. Allow a process that is not the owner of a directory to
 223 modify that directory's access and modification times. Allow a process that is
 224 not the owner of a file or directory to remove or rename a file or directory
 225 whose parent directory has the "save text image after execution" (sticky) bit
 226 set. Allow a process that is not the owner of a file to mount a \fBnamefs\fR
 227 upon that file. Allow a process that is not the owner of a file or directory to
 228 modify that file's or directory's permission bits or ACL.
 229 .RE
 230 
 231 .sp
 232 .ne 2
 233 .na
 234 \fB\fBPRIV_FILE_READ\fR\fR
 235 .ad
 236 .sp .6
 237 .RS 4n
 238 Allow a process to read objects in the filesystem.
 239 .RE
 240 
 241 .sp
 242 .ne 2
 243 .na
 244 \fB\fBPRIV_FILE_SETID\fR\fR
 245 .ad
 246 .sp .6
 247 .RS 4n
 248 Allow a process to change the ownership of a file or write to a file without
 249 the set-user-ID and set-group-ID bits being cleared. Allow a process to set the
 250 set-group-ID bit on a file or directory whose group is not the process's
 251 effective group or one of the process's supplemental groups. Allow a process to
 252 set the set-user-ID bit on a file with different ownership in the presence of
 253 \fBPRIV_FILE_OWNER\fR. Additional restrictions apply when creating or modifying
 254 a setuid 0 file.
 255 .RE
 256 
 257 .sp
 258 .ne 2
 259 .na
 260 \fB\fBPRIV_FILE_UPGRADE_SL\fR\fR
 261 .ad
 262 .sp .6
 263 .RS 4n
 264 Allow a process to set the sensitivity label of a file or directory to a
 265 sensitivity label that dominates the existing sensitivity label.
 266 .sp
 267 This privilege is interpreted only if the system is configured with Trusted
 268 Extensions.
 269 .RE
 270 
 271 .sp
 272 .ne 2
 273 .na
 274 \fB\fBPRIV_FILE_WRITE\fR\fR
 275 .ad
 276 .sp .6
 277 .RS 4n
 278 Allow a process to modify objects in the filesytem.
 279 .RE
 280 
 281 .sp
 282 .ne 2
 283 .na
 284 \fB\fBPRIV_GRAPHICS_ACCESS\fR\fR
 285 .ad
 286 .sp .6
 287 .RS 4n
 288 Allow a process to make privileged ioctls to graphics devices. Typically only
 289 an xserver process needs to have this privilege. A process with this privilege
 290 is also allowed to perform privileged graphics device mappings.
 291 .RE
 292 
 293 .sp
 294 .ne 2
 295 .na
 296 \fB\fBPRIV_GRAPHICS_MAP\fR\fR
 297 .ad
 298 .sp .6
 299 .RS 4n
 300 Allow a process to perform privileged mappings through a graphics device.
 301 .RE
 302 
 303 .sp
 304 .ne 2
 305 .na
 306 \fB\fBPRIV_IPC_DAC_READ\fR\fR
 307 .ad
 308 .sp .6
 309 .RS 4n
 310 Allow a process to read a System V IPC Message Queue, Semaphore Set, or Shared
 311 Memory Segment whose permission bits would not otherwise allow the process read
 312 permission.
 313 .RE
 314 
 315 .sp
 316 .ne 2
 317 .na
 318 \fB\fBPRIV_IPC_DAC_WRITE\fR\fR
 319 .ad
 320 .sp .6
 321 .RS 4n
 322 Allow a process to write a System V IPC Message Queue, Semaphore Set, or Shared
 323 Memory Segment whose permission bits would not otherwise allow the process
 324 write permission.
 325 .RE
 326 
 327 .sp
 328 .ne 2
 329 .na
 330 \fB\fBPRIV_IPC_OWNER\fR\fR
 331 .ad
 332 .sp .6
 333 .RS 4n
 334 Allow a process that is not the owner of a System V IPC Message Queue,
 335 Semaphore Set, or Shared Memory Segment to remove, change ownership of, or
 336 change permission bits of the Message Queue, Semaphore Set, or Shared Memory
 337 Segment.
 338 .RE
 339 
 340 .sp
 341 .ne 2
 342 .na
 343 \fB\fBPRIV_NET_ACCESS\fR\fR
 344 .ad
 345 .sp .6
 346 .RS 4n
 347 Allow a process to open a TCP, UDP, SDP, or SCTP network endpoint.
 348 .RE
 349 
 350 .sp
 351 .ne 2
 352 .na
 353 \fB\fBPRIV_NET_BINDMLP\fR\fR
 354 .ad
 355 .sp .6
 356 .RS 4n
 357 Allow a process to bind to a port that is configured as a multi-level port
 358 (MLP) for the process's zone. This privilege applies to both shared address and
 359 zone-specific address MLPs. See \fBtnzonecfg\fR(\fB4\fR) from the Trusted
 360 Extensions manual pages for information on configuring MLP ports.
 361 .sp
 362 This privilege is interpreted only if the system is configured with Trusted
 363 Extensions.
 364 .RE
 365 
 366 .sp
 367 .ne 2
 368 .na
 369 \fB\fBPRIV_NET_ICMPACCESS\fR\fR
 370 .ad
 371 .sp .6
 372 .RS 4n
 373 Allow a process to send and receive ICMP packets.
 374 .RE
 375 
 376 .sp
 377 .ne 2
 378 .na
 379 \fB\fBPRIV_NET_MAC_AWARE\fR\fR
 380 .ad
 381 .sp .6
 382 .RS 4n
 383 Allow a process to set the \fBNET_MAC_AWARE\fR process flag by using
 384 \fBsetpflags\fR(2). This privilege also allows a process to set the
 385 \fBSO_MAC_EXEMPT\fR socket option by using \fBsetsockopt\fR(3SOCKET). The
 386 \fBNET_MAC_AWARE\fR process flag and the \fBSO_MAC_EXEMPT\fR socket option both
 387 allow a local process to communicate with an unlabeled peer if the local
 388 process's label dominates the peer's default label, or if the local process
 389 runs in the global zone.
 390 .sp
 391 This privilege is interpreted only if the system is configured with Trusted
 392 Extensions.
 393 .RE
 394 
 395 .sp
 396 .ne 2
 397 .na
 398 \fB\fBPRIV_NET_MAC_IMPLICIT\fR\fR
 399 .ad
 400 .sp .6
 401 .RS 4n
 402 Allow a proces to set \fBSO_MAC_IMPLICIT\fR option by using
 403 \fBsetsockopt\fR(3SOCKET).  This allows a privileged process to transmit
 404 implicitly-labeled packets to a peer.
 405 .sp
 406 This privilege is interpreted only if the system is configured with
 407 Trusted Extensions.
 408 .RE
 409 
 410 .sp
 411 .ne 2
 412 .na
 413 \fB\fBPRIV_NET_OBSERVABILITY\fR\fR
 414 .ad
 415 .sp .6
 416 .RS 4n
 417 Allow a process to open a device for just receiving network traffic, sending
 418 traffic is disallowed.
 419 .RE
 420 
 421 .sp
 422 .ne 2
 423 .na
 424 \fB\fBPRIV_NET_PRIVADDR\fR\fR
 425 .ad
 426 .sp .6
 427 .RS 4n
 428 Allow a process to bind to a privileged port number. The privilege port numbers
 429 are 1-1023 (the traditional UNIX privileged ports) as well as those ports
 430 marked as "\fBudp/tcp_extra_priv_ports\fR" with the exception of the ports
 431 reserved for use by NFS and SMB.
 432 .RE
 433 
 434 .sp
 435 .ne 2
 436 .na
 437 \fB\fBPRIV_NET_RAWACCESS\fR\fR
 438 .ad
 439 .sp .6
 440 .RS 4n
 441 Allow a process to have direct access to the network layer.
 442 .RE
 443 
 444 .sp
 445 .ne 2
 446 .na
 447 \fB\fBPRIV_PROC_AUDIT\fR\fR
 448 .ad
 449 .sp .6
 450 .RS 4n
 451 Allow a process to generate audit records. Allow a process to get its own audit
 452 pre-selection information.
 453 .RE
 454 
 455 .sp
 456 .ne 2
 457 .na
 458 \fB\fBPRIV_PROC_CHROOT\fR\fR
 459 .ad
 460 .sp .6
 461 .RS 4n
 462 Allow a process to change its root directory.
 463 .RE
 464 
 465 .sp
 466 .ne 2
 467 .na
 468 \fB\fBPRIV_PROC_CLOCK_HIGHRES\fR\fR
 469 .ad
 470 .sp .6
 471 .RS 4n
 472 Allow a process to use high resolution timers.
 473 .RE
 474 
 475 .sp
 476 .ne 2
 477 .na
 478 \fB\fBPRIV_PROC_EXEC\fR\fR
 479 .ad
 480 .sp .6
 481 .RS 4n
 482 Allow a process to call \fBexec\fR(2).
 483 .RE
 484 
 485 .sp
 486 .ne 2
 487 .na
 488 \fB\fBPRIV_PROC_FORK\fR\fR
 489 .ad
 490 .sp .6
 491 .RS 4n
 492 Allow a process to call \fBfork\fR(2), \fBfork1\fR(2), or \fBvfork\fR(2).
 493 .RE
 494 
 495 .sp
 496 .ne 2
 497 .na
 498 \fB\fBPRIV_PROC_INFO\fR\fR
 499 .ad
 500 .sp .6
 501 .RS 4n
 502 Allow a process to examine the status of processes other than those to which it
 503 can send signals. Processes that cannot be examined cannot be seen in
 504 \fB/proc\fR and appear not to exist.
 505 .RE
 506 
 507 .sp
 508 .ne 2
 509 .na
 510 \fB\fBPRIV_PROC_LOCK_MEMORY\fR\fR
 511 .ad
 512 .sp .6
 513 .RS 4n
 514 Allow a process to lock pages in physical memory.
 515 .RE
 516 
 517 .sp
 518 .ne 2
 519 .na
 520 \fB\fBPRIV_PROC_OWNER\fR\fR
 521 .ad
 522 .sp .6
 523 .RS 4n
 524 Allow a process to send signals to other processes and inspect and modify the
 525 process state in other processes, regardless of ownership. When modifying
 526 another process, additional restrictions apply: the effective privilege set of
 527 the attaching process must be a superset of the target process's effective,
 528 permitted, and inheritable sets; the limit set must be a superset of the
 529 target's limit set; if the target process has any UID set to 0 all privilege
 530 must be asserted unless the effective UID is 0. Allow a process to bind
 531 arbitrary processes to CPUs.
 532 .RE
 533 
 534 .sp
 535 .ne 2
 536 .na
 537 \fB\fBPRIV_PROC_PRIOUP\fR\fR
 538 .ad
 539 .sp .6
 540 .RS 4n
 541 Allow a process to elevate its priority above its current level.
 542 .RE
 543 
 544 .sp
 545 .ne 2
 546 .na
 547 \fB\fBPRIV_PROC_PRIOCNTL\fR\fR
 548 .ad
 549 .sp .6
 550 .RS 4n
 551 Allows all that PRIV_PROC_PRIOUP allows.
 552 Allow a process to change its scheduling class to any scheduling class,
 553 including the RT class.
 554 .RE
 555 
 556 .sp
 557 .ne 2
 558 .na
 559 \fB\fBPRIV_PROC_SESSION\fR\fR
 560 .ad
 561 .sp .6
 562 .RS 4n
 563 Allow a process to send signals or trace processes outside its session.
 564 .RE
 565 
 566 .sp
 567 .ne 2
 568 .na
 569 \fB\fBPRIV_PROC_SETID\fR\fR
 570 .ad
 571 .sp .6
 572 .RS 4n
 573 Allow a process to set its UIDs at will, assuming UID 0 requires all privileges
 574 to be asserted.
 575 .RE
 576 
 577 .sp
 578 .ne 2
 579 .na
 580 \fB\fBPRIV_PROC_TASKID\fR\fR
 581 .ad
 582 .sp .6
 583 .RS 4n
 584 Allow a process to assign a new task ID to the calling process.
 585 .RE
 586 
 587 .sp
 588 .ne 2
 589 .na
 590 \fB\fBPRIV_PROC_ZONE\fR\fR
 591 .ad
 592 .sp .6
 593 .RS 4n
 594 Allow a process to trace or send signals to processes in other zones. See
 595 \fBzones\fR(5).
 596 .RE
 597 
 598 .sp
 599 .ne 2
 600 .na
 601 \fB\fBPRIV_SYS_ACCT\fR\fR
 602 .ad
 603 .sp .6
 604 .RS 4n
 605 Allow a process to enable and disable and manage accounting through
 606 \fBacct\fR(2).
 607 .RE
 608 
 609 .sp
 610 .ne 2
 611 .na
 612 \fB\fBPRIV_SYS_ADMIN\fR\fR
 613 .ad
 614 .sp .6
 615 .RS 4n
 616 Allow a process to perform system administration tasks such as setting node and
 617 domain name and specifying \fBcoreadm\fR(1M) and \fBnscd\fR(1M) settings
 618 .RE
 619 
 620 .sp
 621 .ne 2
 622 .na
 623 \fB\fBPRIV_SYS_AUDIT\fR\fR
 624 .ad
 625 .sp .6
 626 .RS 4n
 627 Allow a process to start the (kernel) audit daemon. Allow a process to view and
 628 set audit state (audit user ID, audit terminal ID, audit sessions ID, audit
 629 pre-selection mask). Allow a process to turn off and on auditing. Allow a
 630 process to configure the audit parameters (cache and queue sizes, event to
 631 class mappings, and policy options).
 632 .RE
 633 
 634 .sp
 635 .ne 2
 636 .na
 637 \fB\fBPRIV_SYS_CONFIG\fR\fR
 638 .ad
 639 .sp .6
 640 .RS 4n
 641 Allow a process to perform various system configuration tasks. Allow
 642 filesystem-specific administrative procedures, such as filesystem configuration
 643 ioctls, quota calls, creation and deletion of snapshots, and manipulating the
 644 PCFS bootsector.
 645 .RE
 646 
 647 .sp
 648 .ne 2
 649 .na
 650 \fB\fBPRIV_SYS_DEVICES\fR\fR
 651 .ad
 652 .sp .6
 653 .RS 4n
 654 Allow a process to create device special files. Allow a process to successfully
 655 call a kernel module that calls the kernel \fBdrv_priv\fR(9F) function to check
 656 for allowed access. Allow a process to open the real console device directly.
 657 Allow a process to open devices that have been exclusively opened.
 658 .RE
 659 
 660 .sp
 661 .ne 2
 662 .na
 663 \fB\fBPRIV_SYS_DL_CONFIG\fR\fR
 664 .ad
 665 .sp .6
 666 .RS 4n
 667 Allow a process to configure a system's datalink interfaces.
 668 .RE
 669 
 670 .sp
 671 .ne 2
 672 .na
 673 \fB\fBPRIV_SYS_IP_CONFIG\fR\fR
 674 .ad
 675 .sp .6
 676 .RS 4n
 677 Allow a process to configure a system's IP interfaces and routes. Allow a
 678 process to configure network parameters for \fBTCP/IP\fR using \fBndd\fR. Allow
 679 a process access to otherwise restricted \fBTCP/IP\fR information using
 680 \fBndd\fR. Allow a process to configure \fBIPsec\fR. Allow a process to pop
 681 anchored \fBSTREAM\fRs modules with matching \fBzoneid\fR.
 682 .RE
 683 
 684 .sp
 685 .ne 2
 686 .na
 687 \fB\fBPRIV_SYS_IPC_CONFIG\fR\fR
 688 .ad
 689 .sp .6
 690 .RS 4n
 691 Allow a process to increase the size of a System V IPC Message Queue buffer.
 692 .RE
 693 
 694 .sp
 695 .ne 2
 696 .na
 697 \fB\fBPRIV_SYS_IPTUN_CONFIG\fR\fR
 698 .ad
 699 .sp .6
 700 .RS 4n
 701 Allow a process to configure IP tunnel links.
 702 .RE
 703 
 704 .sp
 705 .ne 2
 706 .na
 707 \fB\fBPRIV_SYS_LINKDIR\fR\fR
 708 .ad
 709 .sp .6
 710 .RS 4n
 711 Allow a process to unlink and link directories.
 712 .RE
 713 
 714 .sp
 715 .ne 2
 716 .na
 717 \fB\fBPRIV_SYS_MOUNT\fR\fR
 718 .ad
 719 .sp .6
 720 .RS 4n
 721 Allow a process to mount and unmount filesystems that would otherwise be
 722 restricted (that is, most filesystems except \fBnamefs\fR). Allow a process to
 723 add and remove swap devices.
 724 .RE
 725 
 726 .sp
 727 .ne 2
 728 .na
 729 \fB\fBPRIV_SYS_NET_CONFIG\fR\fR
 730 .ad
 731 .sp .6
 732 .RS 4n
 733 Allow a process to do all that \fBPRIV_SYS_IP_CONFIG\fR,
 734 \fBPRIV_SYS_DL_CONFIG\fR, and \fBPRIV_SYS_PPP_CONFIG\fR allow, plus the
 735 following: use the \fBrpcmod\fR STREAMS module and insert/remove STREAMS
 736 modules on locations other than the top of the module stack.
 737 .RE
 738 
 739 .sp
 740 .ne 2
 741 .na
 742 \fB\fBPRIV_SYS_NFS\fR\fR
 743 .ad
 744 .sp .6
 745 .RS 4n
 746 Allow a process to provide NFS service: start NFS kernel threads, perform NFS
 747 locking operations, bind to NFS reserved ports: ports 2049 (\fBnfs\fR) and port
 748 4045 (\fBlockd\fR).
 749 .RE
 750 
 751 .sp
 752 .ne 2
 753 .na
 754 \fB\fBPRIV_SYS_PPP_CONFIG\fR\fR
 755 .ad
 756 .sp .6
 757 .RS 4n
 758 Allow a process to create, configure, and destroy PPP instances with pppd(1M)
 759 \fBpppd\fR(1M) and control PPPoE plumbing with \fBsppptun\fR(1M)sppptun(1M).
 760 This privilege is granted by default to exclusive IP stack instance zones.
 761 .RE
 762 
 763 .sp
 764 .ne 2
 765 .na
 766 \fB\fBPRIV_SYS_RES_BIND\fR\fR
 767 .ad
 768 .sp .6
 769 .RS 4n
 770 Allows a process to bind processes to processor sets.
 771 .RE
 772 
 773 .sp
 774 .ne 2
 775 .na
 776 \fB\fBPRIV_SYS_RES_CONFIG\fR\fR
 777 .ad
 778 .sp .6
 779 .RS 4n
 780 Allows all that PRIV_SYS_RES_BIND allows.
 781 Allow a process to create and delete processor sets, assign CPUs to processor
 782 sets and override the \fBPSET_NOESCAPE\fR property. Allow a process to change
 783 the operational status of CPUs in the system using \fBp_online\fR(2). Allow a
 784 process to configure filesystem quotas. Allow a process to configure resource
 785 pools and bind processes to pools.
 786 .RE
 787 
 788 .sp
 789 .ne 2
 790 .na
 791 \fB\fBPRIV_SYS_RESOURCE\fR\fR
 792 .ad
 793 .sp .6
 794 .RS 4n
 795 Allow a process to exceed the resource limits imposed on it by
 796 \fBsetrlimit\fR(2) and \fBsetrctl\fR(2).
 797 .RE
 798 
 799 .sp
 800 .ne 2
 801 .na
 802 \fB\fBPRIV_SYS_SMB\fR\fR
 803 .ad
 804 .sp .6
 805 .RS 4n
 806 Allow a process to provide NetBIOS or SMB services: start SMB kernel threads or
 807 bind to NetBIOS or SMB reserved ports: ports 137, 138, 139 (NetBIOS) and 445
 808 (SMB).
 809 .RE
 810 
 811 .sp
 812 .ne 2
 813 .na
 814 \fB\fBPRIV_SYS_SUSER_COMPAT\fR\fR
 815 .ad
 816 .sp .6
 817 .RS 4n
 818 Allow a process to successfully call a third party loadable module that calls
 819 the kernel \fBsuser()\fR function to check for allowed access. This privilege
 820 exists only for third party loadable module compatibility and is not used by
 821 Solaris proper.
 822 .RE
 823 
 824 .sp
 825 .ne 2
 826 .na
 827 \fB\fBPRIV_SYS_TIME\fR\fR
 828 .ad
 829 .sp .6
 830 .RS 4n
 831 Allow a process to manipulate system time using any of the appropriate system
 832 calls: \fBstime\fR(2), \fBadjtime\fR(2), and \fBntp_adjtime\fR(2).
 833 .RE
 834 
 835 .sp
 836 .ne 2
 837 .na
 838 \fB\fBPRIV_SYS_TRANS_LABEL\fR\fR
 839 .ad
 840 .sp .6
 841 .RS 4n
 842 Allow a process to translate labels that are not dominated by the process's
 843 sensitivity label to and from an external string form.
 844 .sp
 845 This privilege is interpreted only if the system is configured with Trusted
 846 Extensions.
 847 .RE
 848 
 849 .sp
 850 .ne 2
 851 .na
 852 \fB\fBPRIV_VIRT_MANAGE\fR\fR
 853 .ad
 854 .sp .6
 855 .RS 4n
 856 Allows a process to manage virtualized environments such as \fBxVM\fR(5).
 857 .RE
 858 
 859 .sp
 860 .ne 2
 861 .na
 862 \fB\fBPRIV_WIN_COLORMAP\fR\fR
 863 .ad
 864 .sp .6
 865 .RS 4n
 866 Allow a process to override colormap restrictions.
 867 .sp
 868 Allow a process to install or remove colormaps.
 869 .sp
 870 Allow a process to retrieve colormap cell entries allocated by other processes.
 871 .sp
 872 This privilege is interpreted only if the system is configured with Trusted
 873 Extensions.
 874 .RE
 875 
 876 .sp
 877 .ne 2
 878 .na
 879 \fB\fBPRIV_WIN_CONFIG\fR\fR
 880 .ad
 881 .sp .6
 882 .RS 4n
 883 Allow a process to configure or destroy resources that are permanently retained
 884 by the X server.
 885 .sp
 886 Allow a process to use SetScreenSaver to set the screen saver timeout value
 887 .sp
 888 Allow a process to use ChangeHosts to modify the display access control list.
 889 .sp
 890 Allow a process to use GrabServer.
 891 .sp
 892 Allow a process to use the SetCloseDownMode request that can retain window,
 893 pixmap, colormap, property, cursor, font, or graphic context resources.
 894 .sp
 895 This privilege is interpreted only if the system is configured with Trusted
 896 Extensions.
 897 .RE
 898 
 899 .sp
 900 .ne 2
 901 .na
 902 \fB\fBPRIV_WIN_DAC_READ\fR\fR
 903 .ad
 904 .sp .6
 905 .RS 4n
 906 Allow a process to read from a window resource that it does not own (has a
 907 different user ID).
 908 .sp
 909 This privilege is interpreted only if the system is configured with Trusted
 910 Extensions.
 911 .RE
 912 
 913 .sp
 914 .ne 2
 915 .na
 916 \fB\fBPRIV_WIN_DAC_WRITE\fR\fR
 917 .ad
 918 .sp .6
 919 .RS 4n
 920 Allow a process to write to or create a window resource that it does not own
 921 (has a different user ID). A newly created window property is created with the
 922 window's user ID.
 923 .sp
 924 This privilege is interpreted only if the system is configured with Trusted
 925 Extensions.
 926 .RE
 927 
 928 .sp
 929 .ne 2
 930 .na
 931 \fB\fBPRIV_WIN_DEVICES\fR\fR
 932 .ad
 933 .sp .6
 934 .RS 4n
 935 Allow a process to perform operations on window input devices.
 936 .sp
 937 Allow a process to get and set keyboard and pointer controls.
 938 .sp
 939 Allow a process to modify pointer button and key mappings.
 940 .sp
 941 This privilege is interpreted only if the system is configured with Trusted
 942 Extensions.
 943 .RE
 944 
 945 .sp
 946 .ne 2
 947 .na
 948 \fB\fBPRIV_WIN_DGA\fR\fR
 949 .ad
 950 .sp .6
 951 .RS 4n
 952 Allow a process to use the direct graphics access (DGA) X protocol extensions.
 953 Direct process access to the frame buffer is still required. Thus the process
 954 must have MAC and DAC privileges that allow access to the frame buffer, or the
 955 frame buffer must be allocated to the process.
 956 .sp
 957 This privilege is interpreted only if the system is configured with Trusted
 958 Extensions.
 959 .RE
 960 
 961 .sp
 962 .ne 2
 963 .na
 964 \fB\fBPRIV_WIN_DOWNGRADE_SL\fR\fR
 965 .ad
 966 .sp .6
 967 .RS 4n
 968 Allow a process to set the sensitivity label of a window resource to a
 969 sensitivity label that does not dominate the existing sensitivity label.
 970 .sp
 971 This privilege is interpreted only if the system is configured with Trusted
 972 Extensions.
 973 .RE
 974 
 975 .sp
 976 .ne 2
 977 .na
 978 \fB\fBPRIV_WIN_FONTPATH\fR\fR
 979 .ad
 980 .sp .6
 981 .RS 4n
 982 Allow a process to set a font path.
 983 .sp
 984 This privilege is interpreted only if the system is configured with Trusted
 985 Extensions.
 986 .RE
 987 
 988 .sp
 989 .ne 2
 990 .na
 991 \fB\fBPRIV_WIN_MAC_READ\fR\fR
 992 .ad
 993 .sp .6
 994 .RS 4n
 995 Allow a process to read from a window resource whose sensitivity label is not
 996 equal to the process sensitivity label.
 997 .sp
 998 This privilege is interpreted only if the system is configured with Trusted
 999 Extensions.
1000 .RE
1001 
1002 .sp
1003 .ne 2
1004 .na
1005 \fB\fBPRIV_WIN_MAC_WRITE\fR\fR
1006 .ad
1007 .sp .6
1008 .RS 4n
1009 Allow a process to create a window resource whose sensitivity label is not
1010 equal to the process sensitivity label. A newly created window property is
1011 created with the window's sensitivity label.
1012 .sp
1013 This privilege is interpreted only if the system is configured with Trusted
1014 Extensions.
1015 .RE
1016 
1017 .sp
1018 .ne 2
1019 .na
1020 \fB\fBPRIV_WIN_SELECTION\fR\fR
1021 .ad
1022 .sp .6
1023 .RS 4n
1024 Allow a process to request inter-window data moves without the intervention of
1025 the selection confirmer.
1026 .sp
1027 This privilege is interpreted only if the system is configured with Trusted
1028 Extensions.
1029 .RE
1030 
1031 .sp
1032 .ne 2
1033 .na
1034 \fB\fBPRIV_WIN_UPGRADE_SL\fR\fR
1035 .ad
1036 .sp .6
1037 .RS 4n
1038 Allow a process to set the sensitivity label of a window resource to a
1039 sensitivity label that dominates the existing sensitivity label.
1040 .sp
1041 This privilege is interpreted only if the system is configured with Trusted
1042 Extensions.
1043 .RE
1044 
1045 .sp
1046 .ne 2
1047 .na
1048 \fB\fBPRIV_XVM_CONTROL\fR\fR
1049 .ad
1050 .sp .6
1051 .RS 4n
1052 Allows a process access to the \fBxVM\fR(5) control devices for managing guest
1053 domains and the hypervisor. This privilege is used only if booted into xVM on
1054 x86 platforms.
1055 .RE
1056 
1057 .sp
1058 .LP
1059 Of the privileges listed above, the privileges \fBPRIV_FILE_LINK_ANY\fR,
1060 \fBPRIV_PROC_INFO\fR, \fBPRIV_PROC_SESSION\fR, \fBPRIV_PROC_FORK\fR and
1061 \fBPRIV_PROC_EXEC\fR are considered "basic" privileges. These are privileges
1062 that used to be always available to unprivileged processes. By default,
1063 processes still have the basic privileges.
1064 .sp
1065 .LP
1066 The privileges \fBPRIV_PROC_SETID\fR and \fBPRIV_PROC_AUDIT\fR must be present
1067 in the Limit set (see below) of a process in order for set-uid root \fBexec\fRs
1068 to be successful, that is, get an effective UID of 0 and additional privileges.
1069 .sp
1070 .LP
1071 The privilege implementation in Solaris extends the process credential with
1072 four privilege sets:
1073 .sp
1074 .ne 2
1075 .na
1076 \fBI, the inheritable set\fR
1077 .ad
1078 .RS 26n
1079 The privileges inherited on \fBexec\fR.
1080 .RE
1081 
1082 .sp
1083 .ne 2
1084 .na
1085 \fBP, the permitted set\fR
1086 .ad
1087 .RS 26n
1088 The maximum set of privileges for the process.
1089 .RE
1090 
1091 .sp
1092 .ne 2
1093 .na
1094 \fBE, the effective set\fR
1095 .ad
1096 .RS 26n
1097 The privileges currently in effect.
1098 .RE
1099 
1100 .sp
1101 .ne 2
1102 .na
1103 \fBL, the limit set\fR
1104 .ad
1105 .RS 26n
1106 The upper bound of the privileges a process and its offspring can obtain.
1107 Changes to L take effect on the next \fBexec\fR.
1108 .RE
1109 
1110 .sp
1111 .LP
1112 The sets I, P and E are typically identical to the basic set of privileges for
1113 unprivileged processes. The limit set is typically the full set of privileges.
1114 .sp
1115 .LP
1116 Each process has a Privilege Awareness State (PAS) that can take the value PA
1117 (privilege-aware) and NPA (not-PA). PAS is a transitional mechanism that allows
1118 a choice between full compatibility with the old superuser model and completely
1119 ignoring the effective UID.
1120 .sp
1121 .LP
1122 To facilitate the discussion, we introduce the notion of "observed effective
1123 set" (oE) and "observed permitted set" (oP) and the implementation sets iE and
1124 iP.
1125 .sp
1126 .LP
1127 A process becomes privilege-aware either by manipulating the effective,
1128 permitted, or limit privilege sets through \fBsetppriv\fR(2) or by using
1129 \fBsetpflags\fR(2). In all cases, oE and oP are invariant in the process of
1130 becoming privilege-aware. In the process of becoming privilege-aware, the
1131 following assignments take place:
1132 .sp
1133 .in +2
1134 .nf
1135 iE = oE
1136 iP = oP
1137 .fi
1138 .in -2
1139 
1140 .sp
1141 .LP
1142 When a process is privilege-aware, oE and oP are invariant under UID changes.
1143 When a process is not privilege-aware, oE and oP are observed as follows:
1144 .sp
1145 .in +2
1146 .nf
1147 oE = euid == 0 ? L : iE
1148 oP = (euid == 0 || ruid == 0 || suid == 0) ? L : iP
1149 .fi
1150 .in -2
1151 
1152 .sp
1153 .LP
1154 When a non-privilege-aware process has an effective UID of 0, it can exercise
1155 the privileges contained in its limit set, the upper bound of its privileges.
1156 If a non-privilege-aware process has any of the UIDs 0, it appears to be
1157 capable of potentially exercising all privileges in L.
1158 .sp
1159 .LP
1160 It is possible for a process to return to the non-privilege aware state using
1161 \fBsetpflags()\fR. The kernel always attempts this on \fBexec\fR(2). This
1162 operation is permitted only if the following conditions are met:
1163 .RS +4
1164 .TP
1165 .ie t \(bu
1166 .el o
1167 If any of the UIDs is equal to 0, P must be equal to L.
1168 .RE
1169 .RS +4
1170 .TP
1171 .ie t \(bu
1172 .el o
1173 If the effective UID is equal to 0, E must be equal to L.
1174 .RE
1175 .sp
1176 .LP
1177 When a process gives up privilege awareness, the following assignments take
1178 place:
1179 .sp
1180 .in +2
1181 .nf
1182 if (euid == 0) iE = L & I
1183 if (any uid == 0) iP = L & I
1184 .fi
1185 .in -2
1186 
1187 .sp
1188 .LP
1189 The privileges obtained when not having a UID of \fB0\fR are the inheritable
1190 set of the process restricted by the limit set.
1191 .sp
1192 .LP
1193 Only privileges in the process's (observed) effective privilege set allow the
1194 process to perform restricted operations. A process can use any of the
1195 privilege manipulation functions to add or remove privileges from the privilege
1196 sets. Privileges can be removed always. Only privileges found in the permitted
1197 set can be added to the effective and inheritable set. The limit set cannot
1198 grow. The inheritable set can be larger than the permitted set.
1199 .sp
1200 .LP
1201 When a process performs an \fBexec\fR(2), the kernel first tries to relinquish
1202 privilege awareness before making the following privilege set modifications:
1203 .sp
1204 .in +2
1205 .nf
1206 E' = P' = I' = L & I
1207 L is unchanged
1208 .fi
1209 .in -2
1210 
1211 .sp
1212 .LP
1213 If a process has not manipulated its privileges, the privilege sets effectively
1214 remain the same, as E, P and I are already identical.
1215 .sp
1216 .LP
1217 The limit set is enforced at \fBexec\fR time.
1218 .sp
1219 .LP
1220 To run a non-privilege-aware application in a backward-compatible manner, a
1221 privilege-aware application should start the non-privilege-aware application
1222 with I=basic.
1223 .sp
1224 .LP
1225 For most privileges, absence of the privilege simply results in a failure. In
1226 some instances, the absense of a privilege can cause system calls to behave
1227 differently. In other instances, the removal of a privilege can force a set-uid
1228 application to seriously malfunction. Privileges of this type are considered
1229 "unsafe". When a process is lacking any of the unsafe privileges from its limit
1230 set, the system does not honor the set-uid bit of set-uid root applications.
1231 The following unsafe privileges have been identified: \fBproc_setid\fR,
1232 \fBsys_resource\fR and \fBproc_audit\fR.
1233 .SS "Privilege Escalation"
1234 .LP
1235 In certain circumstances, a single privilege could lead to a process gaining
1236 one or more additional privileges that were not explicitly granted to that
1237 process. To prevent such an escalation of privileges, the security policy
1238 requires explicit permission for those additional privileges.
1239 .sp
1240 .LP
1241 Common examples of escalation are those mechanisms that allow modification of
1242 system resources through "raw'' interfaces; for example, changing kernel data
1243 structures through \fB/dev/kmem\fR or changing files through \fB/dev/dsk/*\fR.
1244 Escalation also occurs when a process controls processes with more privileges
1245 than the controlling process. A special case of this is manipulating or
1246 creating objects owned by UID 0 or trying to obtain UID 0 using
1247 \fBsetuid\fR(2). The special treatment of UID 0 is needed because the UID 0
1248 owns all system configuration files and ordinary file protection mechanisms
1249 allow processes with UID 0 to modify the system configuration. With appropriate
1250 file modifications, a given process running with an effective UID of 0 can gain
1251 all privileges.
1252 .sp
1253 .LP
1254 In situations where a process might obtain UID 0, the security policy requires
1255 additional privileges, up to the full set of privileges. Such restrictions
1256 could be relaxed or removed at such time as additional mechanisms for
1257 protection of system files became available. There are no such mechanisms in
1258 the current Solaris release.
1259 .sp
1260 .LP
1261 The use of UID 0 processes should be limited as much as possible. They should
1262 be replaced with programs running under a different UID but with exactly the
1263 privileges they need.
1264 .sp
1265 .LP
1266 Daemons that never need to \fBexec\fR subprocesses should remove the
1267 \fBPRIV_PROC_EXEC\fR privilege from their permitted and limit sets.
1268 .SS "Assigned Privileges and Safeguards"
1269 .LP
1270 When privileges are assigned to a user, the system administrator could give
1271 that user more powers than intended. The administrator should consider whether
1272 safeguards are needed. For example, if the \fBPRIV_PROC_LOCK_MEMORY\fR
1273 privilege is given to a user, the administrator should consider setting the
1274 \fBproject.max-locked-memory\fR resource control as well, to prevent that user
1275 from locking all memory.
1276 .SS "Privilege Debugging"
1277 .LP
1278 When a system call fails with a permission error, it is not always immediately
1279 obvious what caused the problem. To debug such a problem, you can use a tool
1280 called \fBprivilege debugging\fR. When privilege debugging is enabled for a
1281 process, the kernel reports missing privileges on the controlling terminal of
1282 the process. (Enable debugging for a process with the \fB-D\fR option of
1283 \fBppriv\fR(1).) Additionally, the administrator can enable system-wide
1284 privilege debugging by setting the \fBsystem\fR(4) variable \fBpriv_debug\fR
1285 using:
1286 .sp
1287 .in +2
1288 .nf
1289 set priv_debug = 1
1290 .fi
1291 .in -2
1292 
1293 .sp
1294 .LP
1295 On a running system, you can use \fBmdb\fR(1) to change this variable.
1296 .SS "Privilege Administration"
1297 .LP
1298 The Solaris Management Console (see \fBsmc\fR(1M)) is the preferred method of
1299 modifying privileges for a command. Use \fBusermod\fR(1M) or \fBsmrole\fR(1M)
1300 to assign privileges to or modify privileges for, respectively, a user or a
1301 role. Use \fBppriv\fR(1) to enumerate the privileges supported on a system and
1302 \fBtruss\fR(1) to determine which privileges a program requires.
1303 .SH SEE ALSO
1304 .LP
1305 \fBmdb\fR(1), \fBppriv\fR(1), \fBadd_drv\fR(1M), \fBifconfig\fR(1M),
1306 \fBlockd\fR(1M), \fBnfsd\fR(1M), \fBpppd\fR(1M), \fBrem_drv\fR(1M),
1307 \fBsmbd\fR(1M), \fBsppptun\fR(1M), \fBupdate_drv\fR(1M), \fBIntro\fR(2),
1308 \fBaccess\fR(2), \fBacct\fR(2), \fBacl\fR(2), \fBadjtime\fR(2), \fBaudit\fR(2),
1309 \fBauditon\fR(2), \fBchmod\fR(2), \fBchown\fR(2), \fBchroot\fR(2),
1310 \fBcreat\fR(2), \fBexec\fR(2), \fBfcntl\fR(2), \fBfork\fR(2),
1311 \fBfpathconf\fR(2), \fBgetacct\fR(2), \fBgetpflags\fR(2), \fBgetppriv\fR(2),
1312 \fBgetsid\fR(2), \fBkill\fR(2), \fBlink\fR(2), \fBmemcntl\fR(2),
1313 \fBmknod\fR(2), \fBmount\fR(2), \fBmsgctl\fR(2), \fBnice\fR(2),
1314 \fBntp_adjtime\fR(2), \fBopen\fR(2), \fBp_online\fR(2), \fBpriocntl\fR(2),
1315 \fBpriocntlset\fR(2), \fBprocessor_bind\fR(2), \fBpset_bind\fR(2),
1316 \fBpset_create\fR(2), \fBreadlink\fR(2), \fBresolvepath\fR(2), \fBrmdir\fR(2),
1317 \fBsemctl\fR(2), \fBsetauid\fR(2), \fBsetegid\fR(2), \fBseteuid\fR(2),
1318 \fBsetgid\fR(2), \fBsetgroups\fR(2), \fBsetpflags\fR(2), \fBsetppriv\fR(2),
1319 \fBsetrctl\fR(2), \fBsetregid\fR(2), \fBsetreuid\fR(2), \fBsetrlimit\fR(2),
1320 \fBsettaskid\fR(2), \fBsetuid\fR(2), \fBshmctl\fR(2), \fBshmget\fR(2),
1321 \fBshmop\fR(2), \fBsigsend\fR(2), \fBstat\fR(2), \fBstatvfs\fR(2),
1322 \fBstime\fR(2), \fBswapctl\fR(2), \fBsysinfo\fR(2), \fBuadmin\fR(2),
1323 \fBulimit\fR(2), \fBumount\fR(2), \fBunlink\fR(2), \fButime\fR(2),
1324 \fButimes\fR(2), \fBbind\fR(3SOCKET), \fBdoor_ucred\fR(3C),
1325 \fBpriv_addset\fR(3C), \fBpriv_set\fR(3C), \fBpriv_getbyname\fR(3C),
1326 \fBpriv_getbynum\fR(3C), \fBpriv_set_to_str\fR(3C), \fBpriv_str_to_set\fR(3C),
1327 \fBsocket\fR(3SOCKET), \fBt_bind\fR(3NSL), \fBtimer_create\fR(3C),
1328 \fBucred_get\fR(3C), \fBexec_attr\fR(4), \fBproc\fR(4), \fBsystem\fR(4),
1329 \fBuser_attr\fR(4), \fBxVM\fR(5), \fBddi_cred\fR(9F), \fBdrv_priv\fR(9F),
1330 \fBpriv_getbyname\fR(9F), \fBpriv_policy\fR(9F), \fBpriv_policy_choice\fR(9F),
1331 \fBpriv_policy_only\fR(9F)
1332 .sp
1333 .LP
1334 \fISystem Administration Guide: Security Services\fR