app: improve dbus proxy verbose messages
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
a75229991c
commit
1cb90c0840
|
@ -106,13 +106,14 @@ func (tx *appSealTx) startDBus() error {
|
||||||
if err := tx.dbus.Start(&ready); err != nil {
|
if err := tx.dbus.Start(&ready); err != nil {
|
||||||
return (*StartDBusError)(wrapError(err, "cannot start message bus proxy:", err))
|
return (*StartDBusError)(wrapError(err, "cannot start message bus proxy:", err))
|
||||||
}
|
}
|
||||||
|
verbose.Println("starting message bus proxy:", tx.dbus)
|
||||||
|
|
||||||
// background wait for proxy instance and notify completion
|
// background wait for proxy instance and notify completion
|
||||||
go func() {
|
go func() {
|
||||||
if err := tx.dbus.Wait(); err != nil {
|
if err := tx.dbus.Wait(); err != nil {
|
||||||
fmt.Println("fortify: warn: message bus proxy returned error:", err)
|
fmt.Println("fortify: warn: message bus proxy returned error:", err)
|
||||||
} else {
|
} else {
|
||||||
verbose.Println("message bus proxy uneventful wait")
|
verbose.Println("message bus proxy exit")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure socket removal so ephemeral directory is empty at revert
|
// ensure socket removal so ephemeral directory is empty at revert
|
||||||
|
@ -133,6 +134,7 @@ func (tx *appSealTx) startDBus() error {
|
||||||
if !<-ready {
|
if !<-ready {
|
||||||
return (*StartDBusError)(wrapError(ErrDBusFault, "message bus proxy failed"))
|
return (*StartDBusError)(wrapError(ErrDBusFault, "message bus proxy failed"))
|
||||||
}
|
}
|
||||||
|
verbose.Println("message bus proxy ready")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,9 +213,9 @@ func (tx *appSealTx) commit() error {
|
||||||
|
|
||||||
if tx.dbus != nil {
|
if tx.dbus != nil {
|
||||||
// start dbus proxy
|
// start dbus proxy
|
||||||
verbose.Printf("starting session bus proxy on '%s' for upstream '%s'\n", tx.dbusAddr[0][1], tx.dbusAddr[0][0])
|
verbose.Printf("session bus proxy on '%s' for upstream '%s'\n", tx.dbusAddr[0][1], tx.dbusAddr[0][0])
|
||||||
if tx.dbusSystem {
|
if tx.dbusSystem {
|
||||||
verbose.Printf("starting system bus proxy on '%s' for upstream '%s'\n", tx.dbusAddr[1][1], tx.dbusAddr[1][0])
|
verbose.Printf("system bus proxy on '%s' for upstream '%s'\n", tx.dbusAddr[1][1], tx.dbusAddr[1][0])
|
||||||
}
|
}
|
||||||
if err := tx.startDBus(); err != nil {
|
if err := tx.startDBus(); err != nil {
|
||||||
return (*DBusStartError)(wrapError(err, "cannot start message bus proxy:", err))
|
return (*DBusStartError)(wrapError(err, "cannot start message bus proxy:", err))
|
||||||
|
@ -224,8 +224,6 @@ func (tx *appSealTx) commit() error {
|
||||||
txp.dbusAddr = tx.dbusAddr
|
txp.dbusAddr = tx.dbusAddr
|
||||||
txp.dbusSystem = tx.dbusSystem
|
txp.dbusSystem = tx.dbusSystem
|
||||||
txp.dbusWait = tx.dbusWait
|
txp.dbusWait = tx.dbusWait
|
||||||
|
|
||||||
verbose.Println(xdgDBusProxy, "launch:", tx.dbus)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,6 +337,7 @@ func (seal *appSeal) shareAll(bus [2]*dbus.Config) error {
|
||||||
if bus[1] != nil {
|
if bus[1] != nil {
|
||||||
verbose.Println("sealed system proxy", bus[1].Args(seal.sys.dbusAddr[1]))
|
verbose.Println("sealed system proxy", bus[1].Args(seal.sys.dbusAddr[1]))
|
||||||
}
|
}
|
||||||
|
verbose.Println("message bus proxy final args:", seal.sys.dbus)
|
||||||
}
|
}
|
||||||
|
|
||||||
// workaround for launch method sudo
|
// workaround for launch method sudo
|
||||||
|
|
Loading…
Reference in New Issue