Documentation ¶
Index ¶
- func GenerateSalt64() []byte
- func Hash(salt, password string) (string, error)
- type Privileged
- type Privileges
- type Rules
- func (r *Rules) Exec(args ...string) interface{}
- func (r *Rules) Group() string
- func (r *Rules) Octal() string
- func (r *Rules) Owner() string
- func (r *Rules) Read(args ...string) interface{}
- func (r *Rules) Rules() *Rules
- func (r *Rules) Symbolic(directory bool) string
- func (r *Rules) Write(args ...string) interface{}
- type Session
- func (s *Session) CanChgrp(r *Rules, group string) bool
- func (s *Session) CanChmod(r *Rules, mode string) bool
- func (s *Session) CanChown(r *Rules, owner string) bool
- func (s Session) CanExec(p Privileged) bool
- func (s *Session) CanRead(p Privileged) bool
- func (s *Session) CanWrite(p Privileged) bool
- func (s *Session) ChangePassword(username, salt, hashword string) error
- func (s *Session) DeleteGroup(name string) error
- func (s *Session) DeleteUser(username string) error
- func (s *Session) Exec(p Privileged, args ...string) (interface{}, error)
- func (s *Session) Gid(username, group string) (string, error)
- func (s *Session) GroupListUsersGids(group string) ([]string, error)
- func (s *Session) ListGroups() ([]string, error)
- func (s *Session) ListUsers() ([]string, error)
- func (s *Session) Logout()
- func (s *Session) NewGroup(name string) error
- func (s *Session) NewUser(username, salt, hashword string) error
- func (s *Session) Read(p Privileged, args ...string) (interface{}, error)
- func (s *Session) Umask(mask string) (string, error)
- func (s *Session) UserAddGroup(username, group string) error
- func (s *Session) UserInGroup(username, group string) (bool, error)
- func (s *Session) UserListGroups(username string) ([]string, error)
- func (s *Session) UserRemoveGroup(username, group string) error
- func (s *Session) Write(p Privileged, args ...string) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSalt64 ¶
func GenerateSalt64() []byte
Types ¶
type Privileged ¶
type Privileges ¶
type Privileges struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string) (*Privileges, error)
func (*Privileges) Close ¶
func (p *Privileges) Close()
func (*Privileges) LoginHash ¶
func (p *Privileges) LoginHash(username, hashword string) (*Session, error)
func (*Privileges) Restore ¶
func (p *Privileges) Restore(snapshot []byte) error
func (*Privileges) Snapshot ¶
func (p *Privileges) Snapshot() ([]byte, error)
type Rules ¶
type Rules struct {
// contains filtered or unexported fields
}
type Session ¶
type Session struct { SID string User string Hash string // contains filtered or unexported fields }
func (Session) CanExec ¶
func (s Session) CanExec(p Privileged) bool
func (*Session) CanRead ¶
func (s *Session) CanRead(p Privileged) bool
func (*Session) CanWrite ¶
func (s *Session) CanWrite(p Privileged) bool
func (*Session) ChangePassword ¶
func (*Session) DeleteGroup ¶
func (*Session) DeleteUser ¶
func (*Session) GroupListUsersGids ¶
func (*Session) ListGroups ¶
func (*Session) UserAddGroup ¶
func (*Session) UserListGroups ¶
func (*Session) UserRemoveGroup ¶
Click to show internal directories.
Click to hide internal directories.