From e5448d7ad2c39a6784894e8e840514b0d88333bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 26 Sep 2000 07:18:57 +0000 Subject: Update. 2000-09-26 Ulrich Drepper * sysdeps/unix/sysv/linux/gethostid.c (sethostid): Use O_TRUNC to remove possible garbage at the end of the file. * stdio-common/tmpnam_r.c: Warn about insecure tmpnam_r. * stdio-common/tmpnam.c: Warn about insecure tmpnam. * stdio-common/tempnam.c: Warn about insecure tempnam. * misc/mktemp.c: Warn about insecure mktemp. --- stdio-common/tempnam.c | 5 ++++- stdio-common/tmpnam.c | 5 ++++- stdio-common/tmpnam_r.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'stdio-common') diff --git a/stdio-common/tempnam.c b/stdio-common/tempnam.c index 61af145..9910d9c 100644 --- a/stdio-common/tempnam.c +++ b/stdio-common/tempnam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1996,1997,1998,1999 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993,1996-1999,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,3 +39,6 @@ tempnam (const char *dir, const char *pfx) return __strdup (buf); } + +link_warning (tempnam, + "the use of `tempnam' is dangerous, better use `mkstemp'") diff --git a/stdio-common/tmpnam.c b/stdio-common/tmpnam.c index f78f0f0..c202760 100644 --- a/stdio-common/tmpnam.c +++ b/stdio-common/tmpnam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1996,1997,1998,1999 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993,1996-1999,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -45,3 +45,6 @@ tmpnam (char *s) return s; } + +link_warning (tmpnam, + "the use of `tmpnam' is dangerous, better use `mkstemp'") diff --git a/stdio-common/tmpnam_r.c b/stdio-common/tmpnam_r.c index 409d031..97bd127 100644 --- a/stdio-common/tmpnam_r.c +++ b/stdio-common/tmpnam_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1996,1997,1998,1999 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993,1996-1999,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,3 +33,6 @@ tmpnam_r (char *s) return s; } + +link_warning (tmpnam_r, + "the use of `tmpnam_r' is dangerous, better use `mkstemp'") -- cgit v1.1