summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-03-21 01:32:50 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-03-21 01:32:50 +0000
commitcaaedbfab59a2a03d897cf1684446bcf98ac9eb5 (patch)
treeaaf53bb6a93facb3282d2a54e46ac0895afe9dd7 /libexec/ld.so
parent480dc4adde06fe54aa2665b9b4089af30a42820d (diff)
Switch ld.so's stack smash handler from sendsyslog to sendsyslog2
and pass the LOG_CONS flag like libc's handler. ok deraadt@ bluhm@ (who had a similar diff)
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/alpha/ldasm.S4
-rw-r--r--libexec/ld.so/alpha/syscall.h4
-rw-r--r--libexec/ld.so/amd64/ldasm.S4
-rw-r--r--libexec/ld.so/amd64/syscall.h4
-rw-r--r--libexec/ld.so/arm/ldasm.S4
-rw-r--r--libexec/ld.so/arm/syscall.h4
-rw-r--r--libexec/ld.so/hppa/ldasm.S8
-rw-r--r--libexec/ld.so/hppa/syscall.h4
-rw-r--r--libexec/ld.so/i386/ldasm.S4
-rw-r--r--libexec/ld.so/i386/syscall.h4
-rw-r--r--libexec/ld.so/m88k/ldasm.S4
-rw-r--r--libexec/ld.so/m88k/syscall.h4
-rw-r--r--libexec/ld.so/mips64/ldasm.S4
-rw-r--r--libexec/ld.so/mips64/syscall.h4
-rw-r--r--libexec/ld.so/powerpc/ldasm.S4
-rw-r--r--libexec/ld.so/powerpc/syscall.h4
-rw-r--r--libexec/ld.so/sh/ldasm.S4
-rw-r--r--libexec/ld.so/sh/syscall.h4
-rw-r--r--libexec/ld.so/sparc/ldasm.S10
-rw-r--r--libexec/ld.so/sparc/syscall.h4
-rw-r--r--libexec/ld.so/sparc64/ldasm.S6
-rw-r--r--libexec/ld.so/sparc64/syscall.h4
-rw-r--r--libexec/ld.so/util.c5
23 files changed, 53 insertions, 52 deletions
diff --git a/libexec/ld.so/alpha/ldasm.S b/libexec/ld.so/alpha/ldasm.S
index 15050821587..2c947fd7bc2 100644
--- a/libexec/ld.so/alpha/ldasm.S
+++ b/libexec/ld.so/alpha/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.32 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.33 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -313,7 +313,7 @@ DL_SYSCALL(fstat)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(getdents)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL(gettimeofday)
DL_SYSCALL_NOERR(issetugid)
diff --git a/libexec/ld.so/alpha/syscall.h b/libexec/ld.so/alpha/syscall.h
index 70697b1e95c..e0024634eeb 100644
--- a/libexec/ld.so/alpha/syscall.h
+++ b/libexec/ld.so/alpha/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.30 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.31 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/amd64/ldasm.S b/libexec/ld.so/amd64/ldasm.S
index f50c07cc49b..0f714ec311d 100644
--- a/libexec/ld.so/amd64/ldasm.S
+++ b/libexec/ld.so/amd64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.21 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.22 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2002,2004 Dale Rahn
@@ -96,7 +96,7 @@ DL_SYSCALL(readlink)
DL_SYSCALL(lstat)
DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL2(set_tcb,__set_tcb)
diff --git a/libexec/ld.so/amd64/syscall.h b/libexec/ld.so/amd64/syscall.h
index e7bcca1b427..2991b9b34d8 100644
--- a/libexec/ld.so/amd64/syscall.h
+++ b/libexec/ld.so/amd64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.18 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.19 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/arm/ldasm.S b/libexec/ld.so/arm/ldasm.S
index b505b95b245..fa0b58fd455 100644
--- a/libexec/ld.so/arm/ldasm.S
+++ b/libexec/ld.so/arm/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.19 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.20 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -125,7 +125,7 @@ DL_SYSCALL(readlink)
DL_SYSCALL(lstat)
DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(sysctl)
diff --git a/libexec/ld.so/arm/syscall.h b/libexec/ld.so/arm/syscall.h
index 8a1aeafdd8d..788ebfc9715 100644
--- a/libexec/ld.so/arm/syscall.h
+++ b/libexec/ld.so/arm/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.18 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.19 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/hppa/ldasm.S b/libexec/ld.so/hppa/ldasm.S
index a53f810c27d..536f9304bf0 100644
--- a/libexec/ld.so/hppa/ldasm.S
+++ b/libexec/ld.so/hppa/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.18 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.19 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -272,11 +272,11 @@ ENTRY(_dl_getentropy,0)
nop
EXIT(_dl_getentropy)
-ENTRY(_dl_sendsyslog,0)
- SYSCALL(sendsyslog)
+ENTRY(_dl_sendsyslog2,0)
+ SYSCALL(sendsyslog2)
bv r0(rp)
nop
-EXIT(_dl_sendsyslog)
+EXIT(_dl_sendsyslog2)
ENTRY(_dl_pledge,0)
SYSCALL(pledge)
diff --git a/libexec/ld.so/hppa/syscall.h b/libexec/ld.so/hppa/syscall.h
index e7bcca1b427..2991b9b34d8 100644
--- a/libexec/ld.so/hppa/syscall.h
+++ b/libexec/ld.so/hppa/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.18 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.19 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/i386/ldasm.S b/libexec/ld.so/i386/ldasm.S
index 695c7bb4857..cb0cac0a40a 100644
--- a/libexec/ld.so/i386/ldasm.S
+++ b/libexec/ld.so/i386/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.23 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.24 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -121,7 +121,7 @@ DL_SYSCALL(readlink)
DL_SYSCALL(lstat)
DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(sysctl)
diff --git a/libexec/ld.so/i386/syscall.h b/libexec/ld.so/i386/syscall.h
index ccf1f886c25..42ec3675f3a 100644
--- a/libexec/ld.so/i386/syscall.h
+++ b/libexec/ld.so/i386/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.22 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.23 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/m88k/ldasm.S b/libexec/ld.so/m88k/ldasm.S
index d5adc28a130..91c051cae59 100644
--- a/libexec/ld.so/m88k/ldasm.S
+++ b/libexec/ld.so/m88k/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.16 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.17 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -209,7 +209,7 @@ DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
jmp %r1
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
jmp %r1
DL_SYSCALL(pledge)
diff --git a/libexec/ld.so/m88k/syscall.h b/libexec/ld.so/m88k/syscall.h
index 1aea1d863f0..c88ceb92173 100644
--- a/libexec/ld.so/m88k/syscall.h
+++ b/libexec/ld.so/m88k/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.14 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.15 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S
index a3ad5a36ed3..dae54a722f4 100644
--- a/libexec/ld.so/mips64/ldasm.S
+++ b/libexec/ld.so/mips64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.16 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.17 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -151,7 +151,7 @@ DL_SYSCALL(fstat)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(getdents)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL(gettimeofday)
DL_SYSCALL_NOERR(issetugid)
diff --git a/libexec/ld.so/mips64/syscall.h b/libexec/ld.so/mips64/syscall.h
index d3186e71b1f..bd94519d300 100644
--- a/libexec/ld.so/mips64/syscall.h
+++ b/libexec/ld.so/mips64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.20 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.21 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -56,7 +56,7 @@ long _dl__syscall(quad_t, ...);
int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fd, off_t offset, int whence)
diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S
index 0919219d2bf..ab8a9c487a7 100644
--- a/libexec/ld.so/powerpc/ldasm.S
+++ b/libexec/ld.so/powerpc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.26 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.27 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -147,7 +147,7 @@ DL_SYSCALL(fstat)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(getdents)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL(gettimeofday)
DL_SYSCALL_NOERR(issetugid)
diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h
index 52a09661e0e..3f9edb3b1b9 100644
--- a/libexec/ld.so/powerpc/syscall.h
+++ b/libexec/ld.so/powerpc/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.38 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.39 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -58,7 +58,7 @@ int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t);
int _dl_utrace(const char *, const void *, size_t);
ssize_t _dl_write(int, const char *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/sh/ldasm.S b/libexec/ld.so/sh/ldasm.S
index a8ba04e8fc3..9016c8dd9aa 100644
--- a/libexec/ld.so/sh/ldasm.S
+++ b/libexec/ld.so/sh/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.21 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.22 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 2006 Dale Rahn
@@ -190,7 +190,7 @@ DL_SYSCALL(readlink)
DL_SYSCALL(lstat)
DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
-DL_SYSCALL(sendsyslog)
+DL_SYSCALL(sendsyslog2)
DL_SYSCALL(pledge)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL(sysctl)
diff --git a/libexec/ld.so/sh/syscall.h b/libexec/ld.so/sh/syscall.h
index 3054adddd7e..1e4146c00cb 100644
--- a/libexec/ld.so/sh/syscall.h
+++ b/libexec/ld.so/sh/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.16 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.17 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/sparc/ldasm.S b/libexec/ld.so/sparc/ldasm.S
index e21860bf647..bf41310d9d0 100644
--- a/libexec/ld.so/sparc/ldasm.S
+++ b/libexec/ld.so/sparc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.28 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.29 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -355,10 +355,10 @@ _dl_getentropy:
.section ".text"
.align 4
- .global _dl_sendsyslog
- .type _dl_sendsyslog,@function
-_dl_sendsyslog:
- mov SYS_sendsyslog | SYSCALL_G2RFLAG, %g1 ! calling sys_sendsyslog
+ .global _dl_sendsyslog2
+ .type _dl_sendsyslog2,@function
+_dl_sendsyslog2:
+ mov SYS_sendsyslog2 | SYSCALL_G2RFLAG, %g1 ! calling sys_sendsyslog
add %o7, 8, %g2 ! just return on success
t ST_SYSCALL ! off to wonderland
retl
diff --git a/libexec/ld.so/sparc/syscall.h b/libexec/ld.so/sparc/syscall.h
index 498cc6fe718..5d5c40c29b3 100644
--- a/libexec/ld.so/sparc/syscall.h
+++ b/libexec/ld.so/sparc/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.23 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.24 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S
index 61908f6d3fb..0fa5f65af49 100644
--- a/libexec/ld.so/sparc64/ldasm.S
+++ b/libexec/ld.so/sparc64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.40 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.41 2016/03/21 01:32:49 guenther Exp $ */
/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
/*
@@ -335,8 +335,8 @@ _ENTRY(_dl_getentropy)
retl
sub %g0, %o0, %o0 ! error: result = -errno
-_ENTRY(_dl_sendsyslog)
- mov SYS_sendsyslog | SYSCALL_G2RFLAG, %g1 ! calling sys_sendsyslog
+_ENTRY(_dl_sendsyslog2)
+ mov SYS_sendsyslog2 | SYSCALL_G2RFLAG, %g1 ! calling sys_sendsyslog
add %o7, 8, %g2 ! just return on success
t ST_SYSCALL ! off to wonderland
retl
diff --git a/libexec/ld.so/sparc64/syscall.h b/libexec/ld.so/sparc64/syscall.h
index caf41776c7f..f667ceefd69 100644
--- a/libexec/ld.so/sparc64/syscall.h
+++ b/libexec/ld.so/sparc64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.30 2015/11/15 03:41:24 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.31 2016/03/21 01:32:49 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -57,7 +57,7 @@ int _dl_lstat(const char *, struct stat *);
int _dl_getcwd(char *, size_t);
int _dl_utrace(const char *, const void *, size_t);
int _dl_getentropy(char *, size_t);
-int _dl_sendsyslog(const char *, size_t);
+int _dl_sendsyslog2(const char *, size_t, int);
static inline off_t
_dl_lseek(int fildes, off_t offset, int whence)
diff --git a/libexec/ld.so/util.c b/libexec/ld.so/util.c
index 2b5fe5ebb18..e8fb1295f22 100644
--- a/libexec/ld.so/util.c
+++ b/libexec/ld.so/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.39 2016/03/20 02:29:51 guenther Exp $ */
+/* $OpenBSD: util.c,v 1.40 2016/03/21 01:32:48 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -27,6 +27,7 @@
*/
#include <sys/types.h>
+#include <syslog.h>
#include "archdep.h"
#include "resolve.h"
@@ -53,7 +54,7 @@ __stack_smash_handler(char func[], int damaged)
_dl_strlcat(message, "stack overflow in function ", sizeof message);
_dl_strlcat(message, func, sizeof message);
- _dl_sendsyslog(message, _dl_strlen(message));
+ _dl_sendsyslog2(message, _dl_strlen(message), LOG_CONS);
_dl_exit(127);
}