2021-03-18 22:40:29 +00:00
|
|
|
// +build !linux
|
2019-01-12 04:58:27 +00:00
|
|
|
|
|
|
|
package selinux
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setDisabled() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func getEnabled() bool {
|
2019-01-12 04:58:27 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func classIndex(class string) (int, error) {
|
2020-07-24 21:23:56 +00:00
|
|
|
return -1, nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setFileLabel(fpath string, label string) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func fileLabel(fpath string) (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setFSCreateLabel(label string) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func fsCreateLabel() (string, error) {
|
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func currentLabel() (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func pidLabel(pid int) (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func execLabel() (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func canonicalizeContext(val string) (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func computeCreateContext(source string, target string, class string) (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func calculateGlbLub(sourceRange, targetRange string) (string, error) {
|
2020-07-24 21:23:56 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setExecLabel(label string) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setTaskLabel(label string) error {
|
2020-07-24 21:23:56 +00:00
|
|
|
return nil
|
2019-12-12 01:27:03 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setSocketLabel(label string) error {
|
2019-04-07 17:07:55 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func socketLabel() (string, error) {
|
2019-04-07 17:07:55 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func peerLabel(fd uintptr) (string, error) {
|
2019-12-12 01:27:03 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setKeyLabel(label string) error {
|
2019-04-07 17:07:55 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func keyLabel() (string, error) {
|
2019-04-07 17:07:55 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func (c Context) get() string {
|
2019-01-12 04:58:27 +00:00
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func newContext(label string) (Context, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
c := make(Context)
|
2019-04-07 17:07:55 +00:00
|
|
|
return c, nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func clearLabels() {
|
2019-01-12 04:58:27 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func reserveLabel(label string) {
|
2019-01-12 04:58:27 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func enforceMode() int {
|
2019-01-12 04:58:27 +00:00
|
|
|
return Disabled
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func setEnforceMode(mode int) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func defaultEnforceMode() int {
|
2019-01-12 04:58:27 +00:00
|
|
|
return Disabled
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func releaseLabel(label string) {
|
2019-01-12 04:58:27 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func roFileLabel() string {
|
2019-01-12 04:58:27 +00:00
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func kvmContainerLabels() (string, string) {
|
2020-07-24 21:23:56 +00:00
|
|
|
return "", ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func initContainerLabels() (string, string) {
|
2020-07-24 21:23:56 +00:00
|
|
|
return "", ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func containerLabels() (processLabel string, fileLabel string) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func securityCheckContext(val string) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func copyLevel(src, dest string) (string, error) {
|
2019-01-12 04:58:27 +00:00
|
|
|
return "", nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func chcon(fpath string, label string, recurse bool) error {
|
2019-01-12 04:58:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func dupSecOpt(src string) ([]string, error) {
|
2019-04-07 17:07:55 +00:00
|
|
|
return nil, nil
|
2019-01-12 04:58:27 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 17:43:49 +00:00
|
|
|
func disableSecOpt() []string {
|
2019-01-12 04:58:27 +00:00
|
|
|
return []string{"disable"}
|
|
|
|
}
|
2021-03-18 22:40:29 +00:00
|
|
|
|
|
|
|
func getDefaultContextWithLevel(user, level, scon string) (string, error) {
|
|
|
|
return "", nil
|
|
|
|
}
|