canonical / canonical/secboot

internal/luks2: acquireSharedLock should make more consistent use of `stat`/`fstat`

Open
#418 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
23
Forks
29
Avg merge
2d 8h
Merged PRs (30d)
2

Description

This code is currently performing a mix of `stat` and `fstat` calls via go's `os` package (which give us a `os.FileInfo` implementation) and `stat` and `fstat` system calls via the `unix` package which give is a `unix.Stat_t`. We should investigate using only one set of these - AFAICT, the Linux implementations of `os.FileInfo` return a `syscall.Stat_t` when calling `os.FileInfo.Sys` which would remove the need for the direct use of system calls, but this needs further investigation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.