hostname.if 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ## <summary>Policy for changing the system host name.</summary>
  2. ########################################
  3. ## <summary>
  4. ## Execute hostname in the hostname domain.
  5. ## </summary>
  6. ## <param name="domain">
  7. ## <summary>
  8. ## Domain allowed to transition.
  9. ## </summary>
  10. ## </param>
  11. #
  12. interface(`hostname_domtrans',`
  13. gen_require(`
  14. type hostname_t, hostname_exec_t;
  15. ')
  16. corecmd_search_bin($1)
  17. domtrans_pattern($1, hostname_exec_t, hostname_t)
  18. ')
  19. ########################################
  20. ## <summary>
  21. ## Execute hostname in the hostname domain, and
  22. ## allow the specified role the hostname domain.
  23. ## </summary>
  24. ## <param name="domain">
  25. ## <summary>
  26. ## Domain allowed to transition.
  27. ## </summary>
  28. ## </param>
  29. ## <param name="role">
  30. ## <summary>
  31. ## Role allowed access.
  32. ## </summary>
  33. ## </param>
  34. #
  35. interface(`hostname_run',`
  36. gen_require(`
  37. type hostname_t;
  38. ')
  39. hostname_domtrans($1)
  40. role $2 types hostname_t;
  41. ')
  42. ########################################
  43. ## <summary>
  44. ## Execute hostname in the caller domain.
  45. ## </summary>
  46. ## <param name="domain">
  47. ## <summary>
  48. ## Domain allowed access.
  49. ## </summary>
  50. ## </param>
  51. ## <rolecap/>
  52. #
  53. interface(`hostname_exec',`
  54. gen_require(`
  55. type hostname_exec_t;
  56. ')
  57. corecmd_search_bin($1)
  58. can_exec($1, hostname_exec_t)
  59. ')