Lines Matching refs:fd
29 * @param fd
30 * The netlink socket fd
34 static int get_ack(int fd) {
39 if (fd < 0) {
43 rc = audit_get_reply(fd, &rep, GET_REPLY_BLOCKING, MSG_PEEK);
49 audit_get_reply(fd, &rep, GET_REPLY_BLOCKING, 0);
61 * @param fd
62 * The netlink socket fd
72 static int audit_send(int fd, int type, const void* data, size_t size) {
90 * Check for a valid fd, even though sendto would catch this, its easier
93 if (fd < 0) {
123 rc = TEMP_FAILURE_RETRY(sendto(fd, &req, req.nlh.nlmsg_len, 0,
136 rc = get_ack(fd);
150 int audit_setup(int fd, pid_t pid) {
167 rc = audit_send(fd, AUDIT_SET, &status, sizeof(status));
182 audit_get_reply(fd, &rep, GET_REPLY_NONBLOCKING, 0);
191 int audit_get_reply(int fd, struct audit_message* rep, reply_t block, int peek) {
199 if (fd < 0) {
212 len = TEMP_FAILURE_RETRY(recvfrom(fd, rep, sizeof(*rep), flags,
244 void audit_close(int fd) {
245 close(fd);