system/acl: wrap libacl errors in PathError
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m13s
Test / Hakurei (push) Successful in 3m8s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 5m22s
Test / Hakurei (race detector) (push) Successful in 2m53s
Test / Flake checks (push) Successful in 1m18s

This helps determine which libacl function the errno came from.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-30 13:19:15 +09:00
parent 062bb57b27
commit e1f07be0b2
4 changed files with 125 additions and 9 deletions

View File

@@ -29,8 +29,5 @@ func Update(name string, uid int, perms ...Perm) error {
(*C.acl_perm_t)(p),
C.size_t(len(perms)),
)
if r == 0 {
return nil
}
return err
return newAclPathError(name, int(r), err)
}