label_stub.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //go:build !linux
  2. // +build !linux
  3. package label
  4. // InitLabels returns the process label and file labels to be used within
  5. // the container. A list of options can be passed into this function to alter
  6. // the labels.
  7. func InitLabels(options []string) (string, string, error) {
  8. return "", "", nil
  9. }
  10. // Deprecated: The GenLabels function is only to be used during the transition
  11. // to the official API. Use InitLabels(strings.Fields(options)) instead.
  12. func GenLabels(options string) (string, string, error) {
  13. return "", "", nil
  14. }
  15. func SetFileLabel(path string, fileLabel string) error {
  16. return nil
  17. }
  18. func SetFileCreateLabel(fileLabel string) error {
  19. return nil
  20. }
  21. func Relabel(path string, fileLabel string, shared bool) error {
  22. return nil
  23. }
  24. // DisableSecOpt returns a security opt that can disable labeling
  25. // support for future container processes
  26. func DisableSecOpt() []string {
  27. return nil
  28. }
  29. // Validate checks that the label does not include unexpected options
  30. func Validate(label string) error {
  31. return nil
  32. }
  33. // RelabelNeeded checks whether the user requested a relabel
  34. func RelabelNeeded(label string) bool {
  35. return false
  36. }
  37. // IsShared checks that the label includes a "shared" mark
  38. func IsShared(label string) bool {
  39. return false
  40. }