|
Lines 57-62
Link Here
|
| 57 |
#include <bsm/audit_uevents.h> |
57 |
#include <bsm/audit_uevents.h> |
| 58 |
#include <bsm/audit_record.h> |
58 |
#include <bsm/audit_record.h> |
| 59 |
#include <locale.h> |
59 |
#include <locale.h> |
|
|
60 |
#if defined(__APPLE__) |
| 61 |
#include <errno.h> |
| 62 |
#endif |
| 60 |
|
63 |
|
| 61 |
#if defined(HAVE_GETAUDIT_ADDR) |
64 |
#if defined(HAVE_GETAUDIT_ADDR) |
| 62 |
#define AuditInfoStruct auditinfo_addr |
65 |
#define AuditInfoStruct auditinfo_addr |
|
Lines 78-84
Link Here
|
| 78 |
#define AUToReturnFunc(a,b) au_to_return((a), (u_int)(b)) |
81 |
#define AUToReturnFunc(a,b) au_to_return((a), (u_int)(b)) |
| 79 |
#endif |
82 |
#endif |
| 80 |
|
83 |
|
|
|
84 |
#if !defined(__APPLE__) |
| 81 |
extern int cannot_audit(int); |
85 |
extern int cannot_audit(int); |
|
|
86 |
#endif |
| 82 |
extern void aug_init(void); |
87 |
extern void aug_init(void); |
| 83 |
extern dev_t aug_get_port(void); |
88 |
extern dev_t aug_get_port(void); |
| 84 |
extern int aug_get_machine(char *, u_int32_t *, u_int32_t *); |
89 |
extern int aug_get_machine(char *, u_int32_t *, u_int32_t *); |
|
Lines 241-250
Link Here
|
| 241 |
/* populate our terminal id structure */ |
246 |
/* populate our terminal id structure */ |
| 242 |
#if defined(HAVE_GETAUDIT_ADDR) |
247 |
#if defined(HAVE_GETAUDIT_ADDR) |
| 243 |
tid->at_port = (dev_t)port; |
248 |
tid->at_port = (dev_t)port; |
|
|
249 |
#if defined(__APPLE__) |
| 250 |
/* don't have a aug_get_machine */ |
| 251 |
tid->at_addr[0] = inet_addr(host); |
| 252 |
tid->at_type = 0; |
| 253 |
snprintf(buf, sizeof(buf), "%08x", tid->at_addr[0]); |
| 254 |
debug3("BSM audit: machine ID %s", buf); |
| 255 |
#else |
| 244 |
aug_get_machine((char *)host, &(tid->at_addr[0]), &(tid->at_type)); |
256 |
aug_get_machine((char *)host, &(tid->at_addr[0]), &(tid->at_type)); |
| 245 |
snprintf(buf, sizeof(buf), "%08x %08x %08x %08x", tid->at_addr[0], |
257 |
snprintf(buf, sizeof(buf), "%08x %08x %08x %08x", tid->at_addr[0], |
| 246 |
tid->at_addr[1], tid->at_addr[2], tid->at_addr[3]); |
258 |
tid->at_addr[1], tid->at_addr[2], tid->at_addr[3]); |
| 247 |
debug3("BSM audit: iptype %d machine ID %s", (int)tid->at_type, buf); |
259 |
debug3("BSM audit: iptype %d machine ID %s", (int)tid->at_type, buf); |
|
|
260 |
#endif |
| 248 |
#else |
261 |
#else |
| 249 |
/* this is used on IPv4-only machines */ |
262 |
/* this is used on IPv4-only machines */ |
| 250 |
tid->port = (dev_t)port; |
263 |
tid->port = (dev_t)port; |