label.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // +build !selinux !linux
  2. package label
  3. // InitLabels returns the process label and file labels to be used within
  4. // the container. A list of options can be passed into this function to alter
  5. // the labels.
  6. func InitLabels(options []string) (string, string, error) {
  7. return "", "", nil
  8. }
  9. func GetROMountLabel() string {
  10. return ""
  11. }
  12. func GenLabels(options string) (string, string, error) {
  13. return "", "", nil
  14. }
  15. func FormatMountLabel(src string, mountLabel string) string {
  16. return src
  17. }
  18. func SetProcessLabel(processLabel string) error {
  19. return nil
  20. }
  21. func GetFileLabel(path string) (string, error) {
  22. return "", nil
  23. }
  24. func SetFileLabel(path string, fileLabel string) error {
  25. return nil
  26. }
  27. func SetFileCreateLabel(fileLabel string) error {
  28. return nil
  29. }
  30. func Relabel(path string, fileLabel string, shared bool) error {
  31. return nil
  32. }
  33. func GetPidLabel(pid int) (string, error) {
  34. return "", nil
  35. }
  36. func Init() {
  37. }
  38. func ReserveLabel(label string) error {
  39. return nil
  40. }
  41. func ReleaseLabel(label string) error {
  42. return nil
  43. }
  44. // DupSecOpt takes a process label and returns security options that
  45. // can be used to set duplicate labels on future container processes
  46. func DupSecOpt(src string) []string {
  47. return nil
  48. }
  49. // DisableSecOpt returns a security opt that can disable labeling
  50. // support for future container processes
  51. func DisableSecOpt() []string {
  52. return nil
  53. }
  54. // Validate checks that the label does not include unexpected options
  55. func Validate(label string) error {
  56. return nil
  57. }
  58. // RelabelNeeded checks whether the user requested a relabel
  59. func RelabelNeeded(label string) bool {
  60. return false
  61. }
  62. // IsShared checks that the label includes a "shared" mark
  63. func IsShared(label string) bool {
  64. return false
  65. }