File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use regex::Regex;
10
10
use std:: process;
11
11
use telemetry:: { FsMount , User } ;
12
12
use users:: { get_group_by_gid, get_user_by_uid, get_current_uid} ;
13
+ use users:: os:: unix:: UserExt ;
13
14
14
15
pub fn hostname ( ) -> Result < String > {
15
16
match get_hostname ( ) {
@@ -104,5 +105,6 @@ pub fn user() -> Result<User> {
104
105
uid : user. uid ( ) ,
105
106
group : group. name ( ) . into ( ) ,
106
107
gid : group. gid ( ) ,
108
+ home_dir : user. home_dir ( ) . into ( ) ,
107
109
} )
108
110
}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ use host::Host;
19
19
use pnet:: datalink:: NetworkInterface ;
20
20
use remote:: { Request , Response } ;
21
21
#[ doc( hidden) ] pub use self :: providers:: factory;
22
+ use std:: path:: PathBuf ;
22
23
23
24
/// Top level structure that contains static information about a `Host`.
24
25
#[ derive( Debug ) ]
@@ -121,6 +122,7 @@ pub struct User {
121
122
pub uid : u32 ,
122
123
pub group : String ,
123
124
pub gid : u32 ,
125
+ pub home_dir : PathBuf ,
124
126
}
125
127
126
128
impl Telemetry {
You can’t perform that action at this time.
0 commit comments