shim: expose checkPid in constructor
test / test (push) Successful in 21s
Details
test / test (push) Successful in 21s
Details
This will be supported soon when launching via fsu. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
5524e09a5f
commit
d031c820ff
|
@ -61,6 +61,9 @@ func (a *app) Start() error {
|
||||||
|
|
||||||
Verbose: fmsg.Verbose(),
|
Verbose: fmsg.Verbose(),
|
||||||
},
|
},
|
||||||
|
// checkPid is impossible at the moment since there is no reliable way to obtain shim's pid
|
||||||
|
// this feature is disabled here until sudo is replaced by fortify suid wrapper
|
||||||
|
false,
|
||||||
)
|
)
|
||||||
|
|
||||||
// startup will go ahead, commit system setup
|
// startup will go ahead, commit system setup
|
||||||
|
@ -105,7 +108,7 @@ type StateStoreError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *StateStoreError) equiv(a ...any) error {
|
func (e *StateStoreError) equiv(a ...any) error {
|
||||||
if e.Inner == true && e.DoErr == nil && e.InnerErr == nil && e.Err == nil {
|
if e.Inner && e.DoErr == nil && e.InnerErr == nil && e.Err == nil {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return fmsg.WrapErrorSuffix(e, a...)
|
return fmsg.WrapErrorSuffix(e, a...)
|
||||||
|
|
|
@ -37,10 +37,8 @@ type Shim struct {
|
||||||
payload *Payload
|
payload *Payload
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(executable string, uid uint32, socket string, wl *Wayland, payload *Payload) *Shim {
|
func New(executable string, uid uint32, socket string, wl *Wayland, payload *Payload, checkPid bool) *Shim {
|
||||||
// checkPid is impossible at the moment since there is no way to obtain shim's pid
|
return &Shim{uid: uid, executable: executable, socket: socket, wl: wl, payload: payload, checkPid: checkPid}
|
||||||
// this feature is disabled here until sudo is replaced by fortify suid wrapper
|
|
||||||
return &Shim{uid: uid, executable: executable, socket: socket, wl: wl, payload: payload}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Shim) String() string {
|
func (s *Shim) String() string {
|
||||||
|
|
Loading…
Reference in New Issue