@@ -29,13 +29,13 @@ pub struct Shadow {
29
29
/// It is expressed as the number of days since Jan 1, 1970. The value 0
30
30
/// has a special meaning, which is that the user should change their
31
31
/// password the next time they will log in the system
32
- pub last_change : i64 ,
32
+ pub last_change : libc :: c_long ,
33
33
/// Minimum password age
34
34
///
35
35
/// The minimum password age is the number of days the user will have to
36
36
/// wait before she will be allowed to change their password again.
37
37
/// An empty field and value 0 mean that there are no minimum password age.
38
- pub min : i64 ,
38
+ pub min : libc :: c_long ,
39
39
/// Maximum password age
40
40
///
41
41
/// The maximum password age is the number of days after which the user
@@ -47,15 +47,15 @@ pub struct Shadow {
47
47
///
48
48
/// If the maximum password age is lower than the minimum password age, the
49
49
/// user cannot change their password.
50
- pub max : i64 ,
50
+ pub max : libc :: c_long ,
51
51
/// Password warning period
52
52
///
53
53
/// The number of days before a password is going to expire (see the
54
54
/// maximum password age above) during which the user should be warned.
55
55
///
56
56
/// An empty field and value 0 mean that there are no password warning
57
57
/// period.
58
- pub warn : i64 ,
58
+ pub warn : libc :: c_long ,
59
59
/// Password inactivity period
60
60
///
61
61
/// The number of days after a password has expired (see the maximum
@@ -65,7 +65,7 @@ pub struct Shadow {
65
65
/// After expiration of the password and this expiration period is elapsed,
66
66
/// no login is possible using the current user's password. The user should
67
67
/// contact their system administrator.
68
- pub inactive : i64 ,
68
+ pub inactive : libc :: c_long ,
69
69
/// Account expiration date
70
70
///
71
71
/// The date of expiration of the account, expressed as the number of days
@@ -78,7 +78,7 @@ pub struct Shadow {
78
78
///
79
79
/// The value 0 should not be used as it is interpreted as either an account
80
80
/// with no expiration, or as an expiration on Jan 1, 1970.
81
- pub expire : i64 ,
81
+ pub expire : libc :: c_long ,
82
82
}
83
83
84
84
impl From < & libc:: spwd > for Shadow {
@@ -89,12 +89,12 @@ impl From<&libc::spwd> for Shadow {
89
89
// These casts are necessary to convert the C `long int`
90
90
// integers (which can be either 32 or 64 bits, depending on
91
91
// the CPU architecture) into 64 bit integers.
92
- last_change : spwd. sp_lstchg as i64 ,
93
- min : spwd. sp_min as i64 ,
94
- max : spwd. sp_max as i64 ,
95
- warn : spwd. sp_warn as i64 ,
96
- inactive : spwd. sp_inact as i64 ,
97
- expire : spwd. sp_expire as i64 ,
92
+ last_change : spwd. sp_lstchg ,
93
+ min : spwd. sp_min ,
94
+ max : spwd. sp_max ,
95
+ warn : spwd. sp_warn ,
96
+ inactive : spwd. sp_inact ,
97
+ expire : spwd. sp_expire ,
98
98
}
99
99
}
100
100
}
0 commit comments