From fea0521ff8ac490a72112e6006d4b0cd874e2caf Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 16 Jan 2015 16:18:08 +0000 Subject: to conversion. Verified binaries ok millert, thanks to doug for process advice --- libexec/ld.so/ldconfig/debug.c | 3 +-- libexec/ld.so/ldconfig/dl_prebind.c | 3 +-- libexec/ld.so/ldconfig/ldconfig.c | 6 +++--- libexec/ld.so/ldconfig/library.c | 10 +++++----- libexec/ld.so/ldconfig/prebind.c | 3 +-- libexec/ld.so/ldconfig/shlib.c | 3 +-- 6 files changed, 12 insertions(+), 16 deletions(-) (limited to 'libexec/ld.so/ldconfig') diff --git a/libexec/ld.so/ldconfig/debug.c b/libexec/ld.so/ldconfig/debug.c index 31d466ee3bc..550dac032e3 100644 --- a/libexec/ld.so/ldconfig/debug.c +++ b/libexec/ld.so/ldconfig/debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: debug.c,v 1.5 2013/12/03 01:47:06 deraadt Exp $ */ +/* $OpenBSD: debug.c,v 1.6 2015/01/16 16:18:07 deraadt Exp $ */ /* * Copyright (c) 2006 Dale Rahn * @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/libexec/ld.so/ldconfig/dl_prebind.c b/libexec/ld.so/ldconfig/dl_prebind.c index 9e50a68db97..151b44062dd 100644 --- a/libexec/ld.so/ldconfig/dl_prebind.c +++ b/libexec/ld.so/ldconfig/dl_prebind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dl_prebind.c,v 1.2 2008/04/09 21:45:26 kurt Exp $ */ +/* $OpenBSD: dl_prebind.c,v 1.3 2015/01/16 16:18:07 deraadt Exp $ */ /* * Copyright (c) 2006 Dale Rahn @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/libexec/ld.so/ldconfig/ldconfig.c b/libexec/ld.so/ldconfig/ldconfig.c index ff9906f1ba0..34ea75b8865 100644 --- a/libexec/ld.so/ldconfig/ldconfig.c +++ b/libexec/ld.so/ldconfig/ldconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldconfig.c,v 1.32 2013/12/30 21:58:07 deraadt Exp $ */ +/* $OpenBSD: ldconfig.c,v 1.33 2015/01/16 16:18:07 deraadt Exp $ */ /* * Copyright (c) 1993,1995 Paul Kranenburg @@ -30,7 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -49,6 +48,7 @@ #include #include #include +#include #include "prebind.h" @@ -202,7 +202,7 @@ dodir(char *dir, int silent) { DIR *dd; struct dirent *dp; - char name[MAXPATHLEN]; + char name[PATH_MAX]; int dewey[MAXDEWEY], ndewey; if ((dd = opendir(dir)) == NULL) { diff --git a/libexec/ld.so/ldconfig/library.c b/libexec/ld.so/ldconfig/library.c index e8e71fa31dc..4b1ff1059e7 100644 --- a/libexec/ld.so/ldconfig/library.c +++ b/libexec/ld.so/ldconfig/library.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library.c,v 1.6 2013/12/03 01:47:06 deraadt Exp $ */ +/* $OpenBSD: library.c,v 1.7 2015/01/16 16:18:07 deraadt Exp $ */ /* * Copyright (c) 2006 Dale Rahn * @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include "link.h" #include "sod.h" @@ -151,7 +151,7 @@ elf_load_shlib_hint(struct sod *sod, struct sod *req_sod, return object; } -char elf_hint_store[MAXPATHLEN]; +char elf_hint_store[PATH_MAX]; char * elf_find_shlib(struct sod *sodp, char **searchpath, int nohints) @@ -223,7 +223,7 @@ nohints: match = 1; len = strlcpy( elf_hint_store, *pp, - MAXPATHLEN); + PATH_MAX); if (pp[0][len-1] != '/') { elf_hint_store[len] = '/'; @@ -232,7 +232,7 @@ nohints: strlcpy( &elf_hint_store[len], dp->d_name, - MAXPATHLEN-len); + PATH_MAX-len); if (tsod.sod_major == -1) break; } diff --git a/libexec/ld.so/ldconfig/prebind.c b/libexec/ld.so/ldconfig/prebind.c index 08a2d1ea75e..cb7e4535d49 100644 --- a/libexec/ld.so/ldconfig/prebind.c +++ b/libexec/ld.so/ldconfig/prebind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prebind.c,v 1.27 2014/10/18 03:19:04 doug Exp $ */ +/* $OpenBSD: prebind.c,v 1.28 2015/01/16 16:18:07 deraadt Exp $ */ /* * Copyright (c) 2006 Dale Rahn * @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/libexec/ld.so/ldconfig/shlib.c b/libexec/ld.so/ldconfig/shlib.c index def2ac0a7dc..17ba7c4669e 100644 --- a/libexec/ld.so/ldconfig/shlib.c +++ b/libexec/ld.so/ldconfig/shlib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shlib.c,v 1.9 2006/05/13 16:33:40 deraadt Exp $ */ +/* $OpenBSD: shlib.c,v 1.10 2015/01/16 16:18:07 deraadt Exp $ */ /* $NetBSD: shlib.c,v 1.13 1998/04/04 01:00:29 fvdl Exp $ */ /* @@ -32,7 +32,6 @@ * */ -#include #include #include #include -- cgit v1.2.3