github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/libcontainer/label/label.go (about)

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