Changeset View
Changeset View
Standalone View
Standalone View
lib/libcapsicum/capsicum_helpers.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#define CAPH_IGNORE_EBADF 0x0001 | #define CAPH_IGNORE_EBADF 0x0001 | ||||
#define CAPH_READ 0x0002 | #define CAPH_READ 0x0002 | ||||
#define CAPH_WRITE 0x0004 | #define CAPH_WRITE 0x0004 | ||||
#define CAPH_LOOKUP 0x0008 | #define CAPH_LOOKUP 0x0008 | ||||
__BEGIN_DECLS | __BEGIN_DECLS | ||||
static const unsigned long caph_stream_cmds[] = | static const unsigned long caph_stream_cmds[] = | ||||
{ TIOCGETA, TIOCGWINSZ, FIODTYPE }; | { | ||||
#ifdef TIOCGETA | |||||
TIOCGETA, | |||||
#endif | |||||
#ifdef TIOCGWINSZ | |||||
TIOCGWINSZ, | |||||
#endif | |||||
#ifdef FIODTYPE | |||||
FIODTYPE, | |||||
#endif | |||||
}; | |||||
static const uint32_t caph_stream_fcntls = CAP_FCNTL_GETFL; | static const uint32_t caph_stream_fcntls = CAP_FCNTL_GETFL; | ||||
static __inline void | static __inline void | ||||
caph_stream_rights(cap_rights_t *rights, int flags) | caph_stream_rights(cap_rights_t *rights, int flags) | ||||
{ | { | ||||
cap_rights_init(rights, CAP_EVENT, CAP_FCNTL, CAP_FSTAT, | cap_rights_init(rights, CAP_EVENT, CAP_FCNTL, CAP_FSTAT, | ||||
CAP_IOCTL, CAP_SEEK); | CAP_IOCTL, CAP_SEEK); | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |