Add LOCAL_PEERCRED and related to Dragonfly

https://gitweb.dragonflybsd.org/dragonfly.git/blob/cd4ac48fd186404370e0b8623530b6add4b70400:/sys/sys/ucred.h#l86

None of the other LOCAL_ constants for FreeBSD are available on Dragonfly:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/master:/sys/sys/un.h
This commit is contained in:
Torbjørn Birch Moltu 2020-02-16 19:11:07 +01:00
parent fc51a0f327
commit adb0a34c87
2 changed files with 13 additions and 12 deletions

View File

@ -89,14 +89,6 @@ s! {
pub msg_ctime: ::time_t,
}
pub struct xucred {
pub cr_version: ::c_uint,
pub cr_uid: ::uid_t,
pub cr_ngroups: ::c_short,
pub cr_groups: [::gid_t;16],
__cr_unused1: *mut ::c_void,
}
pub struct stack_t {
pub ss_sp: *mut ::c_void,
pub ss_size: ::size_t,
@ -629,7 +621,6 @@ pub const SO_PROTOCOL: ::c_int = 0x1016;
pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL;
pub const SO_VENDOR: ::c_int = 0x80000000;
pub const LOCAL_PEERCRED: ::c_int = 1;
pub const LOCAL_CREDS: ::c_int = 2;
pub const LOCAL_CONNWAIT: ::c_int = 4;
pub const LOCAL_VENDOR: ::c_int = SO_VENDOR;
@ -1103,9 +1094,6 @@ pub const _PC_ACL_NFS4: ::c_int = 64;
pub const _SC_CPUSET_SIZE: ::c_int = 122;
pub const XU_NGROUPS: ::c_int = 16;
pub const XUCRED_VERSION: ::c_uint = 0;
// Flags which can be passed to pdfork(2)
pub const PD_DAEMON: ::c_int = 0x00000001;
pub const PD_CLOEXEC: ::c_int = 0x00000002;

View File

@ -219,6 +219,14 @@ s! {
pub cmcred_groups: [::gid_t; CMGROUP_MAX],
}
pub struct xucred {
pub cr_version: ::c_uint,
pub cr_uid: ::uid_t,
pub cr_ngroups: ::c_short,
pub cr_groups: [::gid_t; 16],
__cr_unused1: *mut ::c_void,
}
pub struct rtprio {
pub type_: ::c_ushort,
pub prio: ::c_ushort,
@ -947,6 +955,8 @@ pub const SO_RCVTIMEO: ::c_int = 0x1006;
pub const SO_ERROR: ::c_int = 0x1007;
pub const SO_TYPE: ::c_int = 0x1008;
pub const LOCAL_PEERCRED: ::c_int = 1;
pub const SHUT_RD: ::c_int = 0;
pub const SHUT_WR: ::c_int = 1;
pub const SHUT_RDWR: ::c_int = 2;
@ -1133,6 +1143,9 @@ pub const ST_NOSUID: ::c_ulong = 2;
pub const NI_MAXHOST: ::size_t = 1025;
pub const XU_NGROUPS: ::c_int = 16;
pub const XUCRED_VERSION: ::c_uint = 0;
pub const RTLD_LOCAL: ::c_int = 0;
pub const RTLD_NODELETE: ::c_int = 0x1000;
pub const RTLD_NOLOAD: ::c_int = 0x2000;