Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn McKinney
OpenLDAP
Commits
4777232c
Commit
4777232c
authored
Apr 24, 2000
by
Ben Collins
Browse files
when opening files in /tmp use O_CREAT|O_EXCL to overcome race conditions
parent
7fa830b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/tools/ldbmtest.c
View file @
4777232c
...
...
@@ -501,7 +501,7 @@ edit_entry( char c, Datum *data )
strcpy
(
tmpname
,
"/tmp/dbtestXXXXXX"
);
#ifndef HAVE_MKSTEMP
if
(
(
fd
=
open
(
mktemp
(
tmpname
),
O_RDWR
,
0600
))
==
-
1
)
{
if
(
(
fd
=
open
(
mktemp
(
tmpname
),
O_RDWR
|
O_CREAT
|
O_EXCL
,
0600
))
==
-
1
)
{
perror
(
tmpname
);
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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