group

package
v0.0.0-...-17244d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Name    string
	Passwd  string // Password is encrypted if password-shadowing is on
	Gid     uint32
	Members *[]string // member list
}

Group wraps up `group` struct used in kernel

func GetGroupByGid

func GetGroupByGid(gid uint32) (*Group, error)

GetGroupByGid wraps up `getgrgid` system call. It retrieves group records from group file based on gid.

func GetGroupByName

func GetGroupByName(name string) (*Group, error)

GetGroupByName wraps up `getgrnam` system call. It retrieves group records from group file based on group name.

func GetGroupEntry

func GetGroupEntry() []*Group

GetGroupEntry wraps up `getgrent` system call. It performs sequential scans of the records in the group file.

type GroupNotFoundError

type GroupNotFoundError struct {
	Name string
	Gid  uint32
}

func (*GroupNotFoundError) Error

func (err *GroupNotFoundError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL