ban mktemp(3)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 1 replyIn review
- v14 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- add comment regarding return values of git_mkdstemps_mode()
- add patch to drop trivialized gitmkdtemp()
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | wrapper: add git_mkdtemp()wrapper.c wrapper.h | +21 | 0 replies | |
| 2/5 | compat: use git_mkdtemp()compat/ | +1 | 0 replies | |
| 3/5 | compat: remove mingw_mktemp()compat/ compat/ | +0 | 0 replies | |
| 4/5 | banned.h: ban mktemp(3)banned.h | +3 | 0 replies | |
| 5/5 | compat: remove gitmkdtemp()Makefile compat/ compat/ +2 more | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/5] ban mktemp(3)
mktemp(3) is insecure and POSIX.1-2008 no longer specifies it. Stop using it.
Changes since v1:
- add comment regarding return values of git_mkdstemps_mode()
- add patch to drop trivialized gitmkdtemp()
wrapper: add git_mkdtemp()
compat: use git_mkdtemp()
compat: remove mingw_mktemp()
banned.h: ban mktemp(3)
compat: remove gitmkdtemp()
Makefile | 1 - banned.h | 3 +++ compat/mingw-posix.h | 3 --- compat/mingw.c | 12 ------------ compat/mkdtemp.c | 8 -------- compat/posix.h | 3 +-- contrib/buildsystems/CMakeLists.txt | 4 ---- meson.build | 2 +- wrapper.c | 21 +++++++++++++++++++-- wrapper.h | 2 ++ 10 files changed, 26 insertions(+), 33 deletions(-) delete mode 100644 compat/mkdtemp.c
Range-diff against v1:
1: 830e6375aa ! 1: 413131caf6 wrapper: add git_mkdtemp()
@@ wrapper.c: int xmkstemp(char *filename_template)
#define TMP_MAX 16384
-int git_mkstemps_mode(char *pattern, int suffix_len, int mode)
++/*
++ * Returns -1 on error, 0 if it created a directory, or an open file ++ * descriptor to the created regular file.
++ */
+static int git_mkdstemps_mode(char *pattern, int suffix_len, int mode, bool dir)
{
static const char letters[] =
2: 889903eaa2 = 2: f8850b2a92 compat: use git_mkdtemp() 3: 255b97254f = 3: 6986b4b6bf compat: remove mingw_mktemp() 4: 8300d2e224 = 4: f34252f411 banned.h: ban mktemp(3) -: ---------- > 5: d106855a23 compat: remove gitmkdtemp()
Signature · 1 line
2.52.0