Documentation
¶
Overview ¶
Package base handles the base maps that a system needs to have identity. These maps include the passwd and group map. On a system that uses PAM, these are all you need. If your system uses shadow maps, you will need to load an additional map to handle the shadow maps.
Index ¶
- type Base
- func (b *Base) ConnectNetAuth() error
- func (b *Base) FetchGroup() shadow.GroupMap
- func (b *Base) FetchPasswd() shadow.PasswdMap
- func (b *Base) GroupBytes() []byte
- func (b *Base) Load() error
- func (b *Base) LoadNetAuthData(ctx context.Context) error
- func (b *Base) MergeGroup()
- func (b *Base) MergePasswd()
- func (b *Base) PasswdBytes() []byte
- func (b *Base) SetBaseDir(s string)
- func (b *Base) SetFallbackShell(s string)
- func (b *Base) SetLogger(l hclog.Logger)
- func (b *Base) SetMinGID(m int32)
- func (b *Base) SetMinUID(m int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { hclog.Logger // contains filtered or unexported fields }
Base provides a virtual component that handles the passwd and group maps.
func (*Base) ConnectNetAuth ¶
ConnectNetAuth establishes the connection from the localizer to the NetAuth server.
func (*Base) FetchGroup ¶
FetchGroup returns the group map as a formatted string suitable for passing into another map module.
func (*Base) FetchPasswd ¶
FetchPasswd returns the passwd map as a formatted string suitable for passing into another map module.
func (*Base) GroupBytes ¶
GroupBytes returns a byte representation of the new group file as it should appear for writing to disk.
func (*Base) LoadNetAuthData ¶
LoadNetAuthData retrieves updated information from a remove NetAuth server to be merged into the local data already present.
func (*Base) MergeGroup ¶
func (b *Base) MergeGroup()
MergeGroup removes all group entries above the minimum GID and then adds the NetAuth groups that were filtered above.
func (*Base) MergePasswd ¶
func (b *Base) MergePasswd()
MergePasswd removes all entries above the minimum UID and then adds NetAuth entities that were filtered above.
func (*Base) PasswdBytes ¶
PasswdBytes returns a byte representation of the new passwd file as it should appear for writing to disk.
func (*Base) SetBaseDir ¶
SetBaseDir specifies the base directory that all files are read from and written to.
func (*Base) SetFallbackShell ¶
SetFallbackShell is used to specify the shell that should be used if the requested shell is not present on the system or otherwise is not specified.
func (*Base) SetLogger ¶
func (b *Base) SetLogger(l hclog.Logger)
SetLogger sets the internal logger used by the module. If unspecified logging is enabled on the default logger.