label_stub.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // +build !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. // Deprecated: The GenLabels function is only to be used during the transition
  10. // to the official API. Use InitLabels(strings.Fields(options)) instead.
  11. func GenLabels(options string) (string, string, error) {
  12. return "", "", nil
  13. }
  14. func SetFileLabel(path string, fileLabel string) error {
  15. return nil
  16. }
  17. func SetFileCreateLabel(fileLabel string) error {
  18. return nil
  19. }
  20. func Relabel(path string, fileLabel string, shared bool) error {
  21. return nil
  22. }
  23. // DisableSecOpt returns a security opt that can disable labeling
  24. // support for future container processes
  25. func DisableSecOpt() []string {
  26. return nil
  27. }
  28. // Validate checks that the label does not include unexpected options
  29. func Validate(label string) error {
  30. return nil
  31. }
  32. // RelabelNeeded checks whether the user requested a relabel
  33. func RelabelNeeded(label string) bool {
  34. return false
  35. }
  36. // IsShared checks that the label includes a "shared" mark
  37. func IsShared(label string) bool {
  38. return false
  39. }