File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
src/unix/bsd/freebsdlike/freebsd/freebsd13 Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 2626 pub udata: * mut :: c_void,
2727 pub ext: [ u64 ; 4 ] ,
2828 }
29+
30+ pub struct sockcred2 {
31+ pub sc_version: :: c_int,
32+ pub sc_pid: :: pid_t,
33+ pub sc_uid: :: uid_t,
34+ pub sc_euid: :: uid_t,
35+ pub sc_gid: :: gid_t,
36+ pub sc_egid: :: gid_t,
37+ pub sc_ngroups: :: c_int,
38+ pub sc_groups: [ :: gid_t; 1 ] ,
39+ }
2940}
3041
3142s_no_extra_traits ! {
@@ -208,6 +219,20 @@ pub const EINTEGRITY: ::c_int = 97;
208219pub const ELAST : :: c_int = 97 ;
209220pub const GRND_INSECURE : :: c_uint = 0x4 ;
210221
222+ pub const LOCAL_CREDS_PERSISTENT : :: c_int = 3 ;
223+ pub const SCM_CREDS2 : :: c_int = 0x08 ;
224+
225+ f ! {
226+ pub fn SOCKCRED2SIZE ( ngrps: usize ) -> usize {
227+ let ngrps = if ngrps > 0 {
228+ ngrps - 1
229+ } else {
230+ 0
231+ } ;
232+ :: mem:: size_of:: <sockcred2>( ) + :: mem:: size_of:: <:: gid_t>( ) * ngrps
233+ }
234+ }
235+
211236extern "C" {
212237 pub fn aio_readv ( aiocbp : * mut :: aiocb ) -> :: c_int ;
213238 pub fn aio_writev ( aiocbp : * mut :: aiocb ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments