system/wayland: integrate security-context-v1

Had to pass the sync fd through sys. The rest are just part of a standard Op.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-12-06 04:20:15 +09:00
parent 2d606b1f4b
commit 38e92edb8e
2 changed files with 86 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package system
import (
"errors"
"os"
"sync"
"git.ophivana.moe/security/fortify/internal/fmsg"
@@ -56,6 +57,7 @@ func TypeString(e Enablement) string {
type I struct {
uid int
ops []Op
sp *os.File
state [2]bool
lock sync.Mutex
@@ -65,6 +67,10 @@ func (sys *I) UID() int {
return sys.uid
}
func (sys *I) Sync() *os.File {
return sys.sp
}
func (sys *I) Equal(v *I) bool {
if v == nil || sys.uid != v.uid || len(sys.ops) != len(v.ops) {
return false