Documentation
¶
Overview ¶
Package sys is an internal package that contains helper methods for dealing with Linux that are more complicated than basic wrappers. Basic wrappers usually belong in internal/linux. If you feel something belongs in libcontainer/utils or libcontainer/system, it probably belongs here instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FchmodFile ¶
FchmodFile is a wrapper around fchmodat2(AT_EMPTY_PATH) with fallbacks for older kernels. This is distinct from [File.Chmod] and unix.Fchmod in that it works on O_PATH file descriptors.
func FchownFile ¶
FchownFile is a wrapper around fchownat(AT_EMPTY_PATH). This is distinct from [File.Chown] and unix.Fchown in that it works on O_PATH file descriptors.
func VerifyInode ¶
func VerifyInode(file *os.File, checkFunc VerifyInodeFunc) error
VerifyInode verifies that the underlying inode for the given file matches an expected inode type (possibly on a particular kind of filesystem). This is mainly a wrapper around VerifyInodeFunc.
func WriteSysctls ¶
WriteSysctls sets the given sysctls to the requested values.
Types ¶
type VerifyInodeFunc ¶
VerifyInodeFunc is the callback passed to VerifyInode to check if the inode is the expected type (and on the correct filesystem type, in the case of filesystem-specific inodes).