Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4517a48b
Commit
4517a48b
authored
Jan 30, 2022
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
futils: document mktmp's safety
parent
4ac59728
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/futils.h
+10
-2
No files found.
src/futils.h
View file @
4517a48b
...
...
@@ -173,8 +173,16 @@ typedef enum {
extern
int
git_futils_rmdir_r
(
const
char
*
path
,
const
char
*
base
,
uint32_t
flags
);
/**
* Create and open a temporary file with a `_git2_` suffix.
* Writes the filename into path_out.
* Create and open a temporary file with a `_git2_` suffix in a
* protected directory; the file created will created will honor
* the current `umask`. Writes the filename into path_out.
*
* This function is *NOT* suitable for use in temporary directories
* that are world writable. It uses `mktemp` (for portability) and
* many `mktemp` implementations use weak random characters. It
* should only be assumed to be suitable for atomically writing
* a new file in a directory that you control.
*
* @return On success, an open file descriptor, else an error code < 0.
*/
extern
int
git_futils_mktmp
(
git_str
*
path_out
,
const
char
*
filename
,
mode_t
mode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment