Date: Sat, 12 Feb 2022 11:40:05 GMT From: Wolfram Schneider <wosch@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 98839c40c74a - main - better unique file names Message-ID: <202202121140.21CBe50j029950@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=98839c40c74aed19324962c365ebc2cb8520f91e commit 98839c40c74aed19324962c365ebc2cb8520f91e Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2022-02-12 11:35:51 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2022-02-12 11:35:51 +0000 better unique file names Our mktemp(1) implementation uses 8-X for a temp file by default. That's ok, but we should increase the value from 8 to 10 as many other OS already did. PR: 261438 --- usr.bin/mktemp/mktemp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c index 0b320e8c5c85..754cc8da7e4e 100644 --- a/usr.bin/mktemp/mktemp.c +++ b/usr.bin/mktemp/mktemp.c @@ -97,9 +97,9 @@ main(int argc, char **argv) if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) - asprintf(&name, "%s%s.XXXXXXXX", _PATH_TMP, prefix); + asprintf(&name, "%s%s.XXXXXXXXXX", _PATH_TMP, prefix); else - asprintf(&name, "%s/%s.XXXXXXXX", tmpdir, prefix); + asprintf(&name, "%s/%s.XXXXXXXXXX", tmpdir, prefix); /* if this fails, the program is in big trouble already */ if (name == NULL) { if (qflag)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202121140.21CBe50j029950>