forked from security/hakurei
system/wayland: sync file at caller specified address
Storing this in sys is incredibly ugly: sys should be stateless and Ops must keep track of their state. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"git.gensokyo.uk/security/fortify/internal/fmsg"
|
||||
@@ -60,8 +59,6 @@ type I struct {
|
||||
uid int
|
||||
ops []Op
|
||||
ctx context.Context
|
||||
// sync fd passed to bwrap
|
||||
sp *os.File
|
||||
|
||||
// whether sys has been reverted
|
||||
state bool
|
||||
@@ -73,10 +70,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user