File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -173,8 +173,16 @@ typedef enum {
173173extern int git_futils_rmdir_r (const char * path , const char * base , uint32_t flags );
174174
175175/**
176- * Create and open a temporary file with a `_git2_` suffix.
177- * Writes the filename into path_out.
176+ * Create and open a temporary file with a `_git2_` suffix in a
177+ * protected directory; the file created will created will honor
178+ * the current `umask`. Writes the filename into path_out.
179+ *
180+ * This function is *NOT* suitable for use in temporary directories
181+ * that are world writable. It uses `mktemp` (for portability) and
182+ * many `mktemp` implementations use weak random characters. It
183+ * should only be assumed to be suitable for atomically writing
184+ * a new file in a directory that you control.
185+ *
178186 * @return On success, an open file descriptor, else an error code < 0.
179187 */
180188extern int git_futils_mktmp (git_str * path_out , const char * filename , mode_t mode );
You can’t perform that action at this time.
0 commit comments