diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-10 07:52:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-10 07:52:59 +0000 |
commit | 9b82cca59dd16bb9a920a6fc429502c5c8a9d85d (patch) | |
tree | 70540bde4f997a96b2d6d7b5de9167386cdcea03 | |
parent | 4c6d2dd5475ed9f07b02171f7f6d50790a6a302c (diff) |
Warn against getwd() usage.
ok millert@ deraadt@
-rw-r--r-- | lib/libc/compat-43/getwd.c | 5 |
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()"); |