package users
import "k8s.io/kubernetes/cmd/kubeadm/app/util/users"
Index ¶
- func RemoveUsersAndGroups() error
- func UpdatePathOwner(dirPath string, uid, gid int64) error
- func UpdatePathOwnerAndPermissions(path string, uid, gid int64, perms uint32) error
- type EntryMap
- type UsersAndGroups
Functions ¶
func RemoveUsersAndGroups ¶
func RemoveUsersAndGroups() error
RemoveUsersAndGroups is a public wrapper around removeUsersAndGroupsImpl with default system file paths.
func UpdatePathOwner ¶
UpdatePathOwner recursively updates the owners of a directory. It is equivalent to calling `chown -R uid:gid /path/to/dir`.
func UpdatePathOwnerAndPermissions ¶
UpdatePathOwnerAndPermissions updates the owner and permissions of the given path. If the path is a directory it is not recursively updated.
Types ¶
type EntryMap ¶
type EntryMap struct {
// contains filtered or unexported fields
}
EntryMap holds a map of user or group entries.
func (*EntryMap) ID ¶
ID returns the ID for an entry based on the entry name. In case of a user entry it returns the user UID. In case of a group entry it returns the group GID. It returns nil if no such entry exists.
func (*EntryMap) String ¶
String converts an EntryMap object to a readable string.
type UsersAndGroups ¶
type UsersAndGroups struct { // Users is an entry map of users. Users *EntryMap // Groups is an entry map of groups. Groups *EntryMap }
UsersAndGroups is a structure that holds entry maps of users and groups. It is returned by AddUsersAndGroups.
func AddUsersAndGroups ¶
func AddUsersAndGroups() (*UsersAndGroups, error)
AddUsersAndGroups is a public wrapper around addUsersAndGroupsImpl with default system file paths.
Source Files ¶
users_linux.go
- Version
- v1.33.1 (latest)
- Published
- May 15, 2025
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 8 hours ago –
Tools for package owners.