summaryrefslogtreecommitdiffstats
path: root/lib/libc/compat-43/getwd.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2003-10-10 07:52:58 +0000
committermiod <miod@openbsd.org>2003-10-10 07:52:58 +0000
commitdc44c02ce5d0daef1e4ad8b1990fb2fd6d5e5bc5 (patch)
treeda04c4c1f7c9df420d94ae9688e811c84a7aa679 /lib/libc/compat-43/getwd.c
parentCalibration code from FreeBSD/NetBSD. Some of the auich's are clocked too (diff)
downloadwireguard-openbsd-dc44c02ce5d0daef1e4ad8b1990fb2fd6d5e5bc5.tar.xz
wireguard-openbsd-dc44c02ce5d0daef1e4ad8b1990fb2fd6d5e5bc5.zip
Warn against getwd() usage.
ok millert@ deraadt@
Diffstat (limited to 'lib/libc/compat-43/getwd.c')
-rw-r--r--lib/libc/compat-43/getwd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/compat-43/getwd.c b/lib/libc/compat-43/getwd.c
index 789fea05f96..7cf27e77e60 100644
--- a/lib/libc/compat-43/getwd.c
+++ b/lib/libc/compat-43/getwd.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: getwd.c,v 1.7 2003/06/11 21:03:10 deraadt Exp $";
+static char *rcsid = "$OpenBSD: getwd.c,v 1.8 2003/10/10 07:52:58 miod Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -47,3 +47,6 @@ getwd(char *buf)
strlcpy(buf, strerror(errno), MAXPATHLEN);
return((char *)NULL);
}
+
+__warn_references(getwd,
+ "warning: getwd() possibly used unsafely; consider using getcwd()");