summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/check_utility_compat.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-05-01 19:03:14 +0000
committernectar <nectar@FreeBSD.org>2003-05-01 19:03:14 +0000
commit0b64e1476ba01c6ba095af7d0623e93362281a12 (patch)
tree736595316c161b3d1ae559f331feaa6ba12b500e /lib/libc/gen/check_utility_compat.c
parent5ce8f7673e9083fdec888025823478cd3faf1ed7 (diff)
downloadFreeBSD-src-0b64e1476ba01c6ba095af7d0623e93362281a12.zip
FreeBSD-src-0b64e1476ba01c6ba095af7d0623e93362281a12.tar.gz
Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
Diffstat (limited to 'lib/libc/gen/check_utility_compat.c')
-rw-r--r--lib/libc/gen/check_utility_compat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/gen/check_utility_compat.c b/lib/libc/gen/check_utility_compat.c
index 2a0db43..0ccdec1 100644
--- a/lib/libc/gen/check_utility_compat.c
+++ b/lib/libc/gen/check_utility_compat.c
@@ -30,12 +30,15 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "namespace.h"
+/*
+ * I din't use "namespace.h" here because none of the relevant utilities
+ * are threaded, so I'm not concerned about cancellation points or other
+ * niceties.
+ */
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "un-namespace.h"
#ifndef LINE_MAX
#define LINE_MAX _POSIX2_LINE_MAX
@@ -52,7 +55,7 @@ check_utility_compat(const char *utility)
int len;
if ((p = getenv(_ENV_UTIL_COMPAT)) != NULL) {
- _strlcpy(buf, p, sizeof buf);
+ strlcpy(buf, p, sizeof buf);
} else {
if ((len = readlink(_PATH_UTIL_COMPAT, buf, sizeof buf)) < 0)
return 0;
OpenPOWER on IntegriCloud