-/* $OpenBSD: stack_protector.c,v 1.12 2012/08/24 01:28:54 matthew Exp $ */
+/* $OpenBSD: stack_protector.c,v 1.13 2013/12/27 03:22:27 deraadt Exp $ */
/*
* Copyright (c) 2002 Hiroaki Etoh, Federico G. Schwindt, and Miodrag Vallat.
extern int __sysctl(int *, u_int, void *, size_t *, void *, size_t);
-#ifdef __ELF__
long __guard[8] __attribute__((section(".openbsd.randomdata")));
-#else
-long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
-#endif
static void __guard_setup(void) __attribute__ ((constructor));
void __stack_smash_handler(char func[], int damaged __attribute__((unused)));
if (__guard[i] != 0)
return;
-#if 0
- {
- struct syslog_data sdata = SYSLOG_DATA_INIT;
- syslog_r(LOG_WARNING, &sdata, "__guard not initialized");
- }
-#endif
-
mib[0] = CTL_KERN;
mib[1] = KERN_ARND;