aboutsummaryrefslogtreecommitdiffstats
path: root/compat/mkdtemp.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-16 11:08:34 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-16 11:08:35 +0900
commit91bfbf49b6566d2b412d12240336027e351a631c (patch)
treefb6f10e6d9e0565d3d3dfe83e10652c4325239b6 /compat/mkdtemp.c
parent72154ce4147e971b59e10d79648b114481703607 (diff)
parent10bba537c4c23e713af05be700748c6a3c25bf68 (diff)
downloadgit-91bfbf49b6566d2b412d12240336027e351a631c.tar.gz
Merge branch 'rs/ban-mktemp'
Rewrite the only use of "mktemp()" that is subject to TOCTOU race and Stop using the insecure "mktemp()" function. * rs/ban-mktemp: compat: remove gitmkdtemp() banned.h: ban mktemp(3) compat: remove mingw_mktemp() compat: use git_mkdtemp() wrapper: add git_mkdtemp()
Diffstat (limited to 'compat/mkdtemp.c')
-rw-r--r--compat/mkdtemp.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/compat/mkdtemp.c b/compat/mkdtemp.c
deleted file mode 100644
index 1136119592..0000000000
--- a/compat/mkdtemp.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "../git-compat-util.h"
-
-char *gitmkdtemp(char *template)
-{
- if (!*mktemp(template) || mkdir(template, 0700))
- return NULL;
- return template;
-}