Documentation ¶
Index ¶
- Constants
- func Chown(f *os.File, uid UserID, gid GroupID) error
- func ChownPath(path string, uid UserID, gid GroupID) error
- func Fchown(fd int, uid UserID, gid GroupID) error
- func FchownAt(dirfd uintptr, path string, uid UserID, gid GroupID, flags int) error
- func FcntlGetFl(fd int) (int, error)
- type GroupID
- type UserID
Constants ¶
View Source
const FlagID = 1<<32 - 1
FlagID can be passed to chown-ish functions to mean "no change", and can be returned from getuid-ish functions to mean "not found".
View Source
const O_PATH = 0x200000
As of Go 1.9, the O_PATH constant does not seem to be declared uniformly over all archtiectures.
Variables ¶
This section is empty.
Functions ¶
func FcntlGetFl ¶
Types ¶
type GroupID ¶
type GroupID uint32
GroupID is the type of the system's group identifiers (in C, gid_t).
type UserID ¶
type UserID uint32
UserID is the type of the system's user identifiers (in C, uid_t).
We give it its own explicit type so you don't have to remember that it's a uint32 (which lead to the bug this package fixes in the first place)
func Getuid ¶
func Getuid() UserID
uid_t is an unsigned 32-bit integer in linux right now. so syscall.Gete?[ug]id are wrong, and break in 32 bits (see https://github.com/golang/go/issues/22739)
Click to show internal directories.
Click to hide internal directories.