View | Details | Raw Unified | Return to bug 1420 | Differences between
and this patch

Collapse All | Expand All

(-)../openssh-4.4p1.orig/audit-bsm.c (+13 lines)
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;
(-)../openssh-4.4p1.orig/configure (+17 lines)
Lines 13669-13674 Link Here
13669
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13669
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13670
_ACEOF
13670
_ACEOF
13671
13671
13672
13673
				case "$host" in
13674
				*-*-darwin7* | *-*-darwin8*)
13675
					echo "$as_me:$LINENO: checking for getaudit_addr usability" >&5
13676
echo $ECHO_N "checking for getaudit_addr usability... $ECHO_C" >&6
13677
					echo "$as_me:$LINENO: result: no" >&5
13678
echo "${ECHO_T}no" >&6
13679
					;;
13680
					*)
13681
cat >>confdefs.h <<\_ACEOF
13682
#define HAVE_GETAUDIT_ADDR 1
13683
_ACEOF
13684
13685
					;;
13686
				esac
13687
13688
13672
fi
13689
fi
13673
done
13690
done
13674
13691
(-)../openssh-4.4p1.orig/configure.ac (-1 / +15 lines)
Lines 1201-1207 Link Here
1201
		AC_CHECK_FUNCS(getaudit, [],
1201
		AC_CHECK_FUNCS(getaudit, [],
1202
		    [AC_MSG_ERROR(BSM enabled and required function not found)])
1202
		    [AC_MSG_ERROR(BSM enabled and required function not found)])
1203
		# These are optional
1203
		# These are optional
1204
		AC_CHECK_FUNCS(getaudit_addr)
1204
		AC_CHECK_FUNCS(getaudit_addr,
1205
				[
1206
				case "$host" in
1207
				*-*-darwin7* | *-*-darwin8*)
1208
					AC_MSG_CHECKING(for getaudit_addr usability)
1209
					AC_MSG_RESULT(no)
1210
					;;
1211
					*) AC_DEFINE(HAVE_GETAUDIT_ADDR,
1212
							1,
1213
							[Define if libbsm has 'getaudit_addr'.]
1214
							)
1215
					;;
1216
				esac
1217
				]
1218
				)
1205
		AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1219
		AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1206
		;;
1220
		;;
1207
	  debug)
1221
	  debug)

Return to bug 1420