mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-06 22:47:37 +03:00
The intention is to keep to repo root clean while the list of packages is slowly growing. Additionally, a bunch of small (~30 LoC) files in the repo root is merged into a single maddy.go file, for the same reason. Most of the internal code is moved into the internal/ directory. Go toolchain will make it impossible to import these packages from external applications. Some packages are renamed and moved into the pkg/ directory in the root. According to https://github.com/golang-standards/project-layout this is the de-facto standard to place "library code that's ok to use by external applications" in. To clearly define the purpose of top-level directories, README.md files are added to each.
46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
// shadow package implements utilities for parsing and using shadow password
|
|
// database on Unix systems.
|
|
package shadow
|
|
|
|
type Entry struct {
|
|
// User login name.
|
|
Name string
|
|
|
|
// Hashed user password.
|
|
Pass string
|
|
|
|
// Days since Jan 1, 1970 password was last changed.
|
|
LastChange int
|
|
|
|
// The number of days the user will have to wait before she will be allowed to
|
|
// change her password again.
|
|
//
|
|
// -1 if password aging is disabled.
|
|
MinPassAge int
|
|
|
|
// The number of days after which the user will have to change her password.
|
|
//
|
|
// -1 is password aging is disabled.
|
|
MaxPassAge int
|
|
|
|
// The number of days before a password is going to expire (see the maximum
|
|
// password age above) during which the user should be warned.
|
|
//
|
|
// -1 is password aging is disabled.
|
|
WarnPeriod int
|
|
|
|
// The number of days after a password has expired (see the maximum
|
|
// password age above) during which the password should still be accepted.
|
|
//
|
|
// -1 is password aging is disabled.
|
|
InactivityPeriod int
|
|
|
|
// The date of expiration of the account, expressed as the number of days
|
|
// since Jan 1, 1970.
|
|
//
|
|
// -1 is account never expires.
|
|
AcctExpiry int
|
|
|
|
// Unused now.
|
|
Flags int
|
|
}
|