aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system/xhost.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/system/xhost.go')
-rw-r--r--internal/system/xhost.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/internal/system/xhost.go b/internal/system/xhost.go
index 89e63db5..bbc0a914 100644
--- a/internal/system/xhost.go
+++ b/internal/system/xhost.go
@@ -3,7 +3,6 @@ package system
import (
"fmt"
- "git.gensokyo.uk/security/fortify/internal/fmsg"
"git.gensokyo.uk/security/fortify/xcb"
)
@@ -23,19 +22,19 @@ func (x XHost) Type() Enablement {
return EX11
}
-func (x XHost) apply(_ *I) error {
- fmsg.Verbosef("inserting entry %s to X11", x)
- return fmsg.WrapErrorSuffix(xcb.ChangeHosts(xcb.HostModeInsert, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
+func (x XHost) apply(sys *I) error {
+ sys.printf("inserting entry %s to X11", x)
+ return sys.wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeInsert, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
fmt.Sprintf("cannot insert entry %s to X11:", x))
}
-func (x XHost) revert(_ *I, ec *Criteria) error {
+func (x XHost) revert(sys *I, ec *Criteria) error {
if ec.hasType(x) {
- fmsg.Verbosef("deleting entry %s from X11", x)
- return fmsg.WrapErrorSuffix(xcb.ChangeHosts(xcb.HostModeDelete, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
+ sys.printf("deleting entry %s from X11", x)
+ return sys.wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeDelete, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
fmt.Sprintf("cannot delete entry %s from X11:", x))
} else {
- fmsg.Verbosef("skipping entry %s in X11", x)
+ sys.printf("skipping entry %s in X11", x)
return nil
}
}