File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ num = "0.4.0"
17
17
log = " 0.4.17"
18
18
derivative = " 2.1.1"
19
19
zeroize = " 1.1.0"
20
- users = " 0.11.0"
21
20
url = " 2.2.0"
22
21
spiffe = { version = " 0.2.0" , optional = true }
22
+ libc = " 0.2.147"
23
23
24
24
[dev-dependencies ]
25
25
mockstream = " 0.0.3"
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl TryFrom<&Authentication> for RequestAuth {
49
49
Authentication :: None => Ok ( RequestAuth :: new ( Vec :: new ( ) ) ) ,
50
50
Authentication :: Direct ( name) => Ok ( RequestAuth :: new ( name. bytes ( ) . collect ( ) ) ) ,
51
51
Authentication :: UnixPeerCredentials => {
52
- let current_uid = users :: get_current_uid ( ) ;
52
+ let current_uid: libc :: uid_t = unsafe { libc :: getuid ( ) } ;
53
53
Ok ( RequestAuth :: new ( current_uid. to_le_bytes ( ) . to_vec ( ) ) )
54
54
}
55
55
#[ cfg( feature = "spiffe-auth" ) ]
Original file line number Diff line number Diff line change @@ -854,8 +854,9 @@ fn peer_credential_auth_test() {
854
854
. expect ( "Failed to call destroy key" ) ;
855
855
856
856
let req = get_req_from_bytes ( client. get_mock_write ( ) ) ;
857
+ let current_uid: libc:: uid_t = unsafe { libc:: getuid ( ) } ;
857
858
assert_eq ! (
858
- & users :: get_current_uid ( ) . to_le_bytes( ) . to_vec( ) ,
859
+ & current_uid . to_le_bytes( ) . to_vec( ) ,
859
860
req. auth. buffer. expose_secret( )
860
861
) ;
861
862
}
You can’t perform that action at this time.
0 commit comments