aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system/op.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-12-06 04:20:15 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-12-06 04:20:15 +0900
commit38e92edb8efd7cc74031d013a13af5c1c8ddd284 (patch)
tree96459a765eb7e502a06ad4088b468f184fd67079 /internal/system/op.go
parent2d606b1f4b92fc9c037aaf5718bc3e24ef05a532 (diff)
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>
Diffstat (limited to 'internal/system/op.go')
-rw-r--r--internal/system/op.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/system/op.go b/internal/system/op.go
index 7d293773..d2ca5dd7 100644
--- a/internal/system/op.go
+++ b/internal/system/op.go
@@ -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