label.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 GenLabels(options string) (string, string, error) {
  10. return "", "", nil
  11. }
  12. func FormatMountLabel(src string, mountLabel string) string {
  13. return src
  14. }
  15. func SetProcessLabel(processLabel string) error {
  16. return nil
  17. }
  18. func GetFileLabel(path string) (string, error) {
  19. return "", nil
  20. }
  21. func SetFileLabel(path string, fileLabel string) error {
  22. return nil
  23. }
  24. func SetFileCreateLabel(fileLabel string) error {
  25. return nil
  26. }
  27. func Relabel(path string, fileLabel string, shared bool) error {
  28. return nil
  29. }
  30. func GetPidLabel(pid int) (string, error) {
  31. return "", nil
  32. }
  33. func Init() {
  34. }
  35. func ReserveLabel(label string) error {
  36. return nil
  37. }
  38. func UnreserveLabel(label string) error {
  39. return nil
  40. }
  41. // DupSecOpt takes a process label and returns security options that
  42. // can be used to set duplicate labels on future container processes
  43. func DupSecOpt(src string) []string {
  44. return nil
  45. }
  46. // DisableSecOpt returns a security opt that can disable labeling
  47. // support for future container processes
  48. func DisableSecOpt() []string {
  49. return nil
  50. }
  51. // Validate checks that the label does not include unexpected options
  52. func Validate(label string) error {
  53. return nil
  54. }
  55. // RelabelNeeded checks whether the user requested a relabel
  56. func RelabelNeeded(label string) bool {
  57. return false
  58. }
  59. // IsShared checks that the label includes a "shared" mark
  60. func IsShared(label string) bool {
  61. return false
  62. }