internal/wayland: increase error detail
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m16s
Test / Hpkg (push) Successful in 4m5s
Test / Sandbox (race detector) (push) Successful in 4m18s
Test / Hakurei (race detector) (push) Successful in 5m8s
Test / Flake checks (push) Successful in 1m21s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m16s
Test / Hpkg (push) Successful in 4m5s
Test / Sandbox (race detector) (push) Successful in 4m18s
Test / Hakurei (race detector) (push) Successful in 5m8s
Test / Flake checks (push) Successful in 1m21s
This includes targeted paths in the returned errors. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -36,18 +36,18 @@ func (sc *SecurityContext) Close() error {
|
||||
func New(displayPath, bindPath *check.Absolute, appID, instanceID string) (*SecurityContext, error) {
|
||||
// ensure bindPath is available
|
||||
if f, err := os.Create(bindPath.String()); err != nil {
|
||||
return nil, &Error{Cause: RHostCreate, Errno: err}
|
||||
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}
|
||||
} else if err = f.Close(); err != nil {
|
||||
return nil, &Error{Cause: RHostCreate, Errno: err}
|
||||
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}
|
||||
} else if err = os.Remove(bindPath.String()); err != nil {
|
||||
return nil, &Error{Cause: RHostCreate, Errno: err}
|
||||
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}
|
||||
}
|
||||
|
||||
if fd, err := syscall.Socket(syscall.AF_UNIX, syscall.SOCK_STREAM|syscall.SOCK_CLOEXEC, 0); err != nil {
|
||||
return nil, &Error{RHostSocket, err}
|
||||
return nil, &Error{RHostSocket, bindPath.String(), displayPath.String(), err}
|
||||
} else if err = syscall.Connect(fd, &syscall.SockaddrUnix{Name: displayPath.String()}); err != nil {
|
||||
_ = syscall.Close(fd)
|
||||
return nil, &Error{RHostConnect, err}
|
||||
return nil, &Error{RHostConnect, bindPath.String(), displayPath.String(), err}
|
||||
} else {
|
||||
closeFds, bindErr := securityContextBindPipe(fd, bindPath, appID, instanceID)
|
||||
if bindErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user