README 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. pam_selinux — PAM module to set the default security context
  2. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  3. DESCRIPTION
  4. pam_selinux is a PAM module that sets up the default SELinux security context
  5. for the next executed process.
  6. When a new session is started, the open_session part of the module computes and
  7. sets up the execution security context used for the next execve(2) call, the
  8. file security context for the controlling terminal, and the security context
  9. used for creating a new kernel keyring.
  10. When the session is ended, the close_session part of the module restores old
  11. security contexts that were in effect before the change made by the
  12. open_session part of the module.
  13. Adding pam_selinux into the PAM stack might disrupt behavior of other PAM
  14. modules which execute applications. To avoid that, pam_selinux.so open should
  15. be placed after such modules in the PAM stack, and pam_selinux.so close should
  16. be placed before them. When such a placement is not feasible, pam_selinux.so
  17. restore could be used to temporary restore original security contexts.
  18. OPTIONS
  19. open
  20. Only execute the open_session part of the module.
  21. close
  22. Only execute the close_session part of the module.
  23. restore
  24. In open_session part of the module, temporarily restore the security
  25. contexts as they were before the previous call of the module. Another call
  26. of this module without the restore option will set up the new security
  27. contexts again.
  28. nottys
  29. Do not setup security context of the controlling terminal.
  30. debug
  31. Turn on debug messages via syslog(3).
  32. verbose
  33. Attempt to inform the user when security context is set.
  34. select_context
  35. Attempt to ask the user for a custom security context role. If MLS is on,
  36. ask also for sensitivity level.
  37. env_params
  38. Attempt to obtain a custom security context role from PAM environment. If
  39. MLS is on, obtain also sensitivity level. This option and the
  40. select_context option are mutually exclusive. The respective PAM
  41. environment variables are SELINUX_ROLE_REQUESTED, SELINUX_LEVEL_REQUESTED,
  42. and SELINUX_USE_CURRENT_RANGE. The first two variables are self describing
  43. and the last one if set to 1 makes the PAM module behave as if the
  44. use_current_range was specified on the command line of the module.
  45. use_current_range
  46. Use the sensitivity level of the current process for the user context
  47. instead of the default level. Also suppresses asking of the sensitivity
  48. level from the user or obtaining it from PAM environment.
  49. EXAMPLES
  50. auth required pam_unix.so
  51. session required pam_permit.so
  52. session optional pam_selinux.so
  53. AUTHOR
  54. pam_selinux was written by Dan Walsh <dwalsh@redhat.com>.