maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1/*
 2Maddy Mail Server - Composable all-in-one email server.
 3Copyright © 2019-2020 Max Mazurov <fox.cpp@disroot.org>, Maddy Mail Server contributors
 4
 5This program is free software: you can redistribute it and/or modify
 6it under the terms of the GNU General Public License as published by
 7the Free Software Foundation, either version 3 of the License, or
 8(at your option) any later version.
 9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program.  If not, see <https://www.gnu.org/licenses/>.
17*/
18
19// shadow package implements utilities for parsing and using shadow password
20// database on Unix systems.
21package shadow
22
23type Entry struct {
24	// User login name.
25	Name string
26
27	// Hashed user password.
28	Pass string
29
30	// Days since Jan 1, 1970 password was last changed.
31	LastChange int
32
33	// The number of days the user will have to wait before she will be allowed to
34	// change her password again.
35	//
36	// -1 if password aging is disabled.
37	MinPassAge int
38
39	// The number of days after which the user will have to change her password.
40	//
41	// -1 is password aging is disabled.
42	MaxPassAge int
43
44	// The number of days before a password is going to expire (see the maximum
45	// password age above) during which the user should be warned.
46	//
47	// -1 is password aging is disabled.
48	WarnPeriod int
49
50	// The number of days after a password has expired (see the maximum
51	// password age above) during which the password should still be accepted.
52	//
53	// -1 is password aging is disabled.
54	InactivityPeriod int
55
56	// The date of expiration of the account, expressed as the number of days
57	// since Jan 1, 1970.
58	//
59	// -1 is account never expires.
60	AcctExpiry int
61
62	// Unused now.
63	Flags int
64}