Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0f7a2a5f
Commit
0f7a2a5f
authored
Nov 03, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create temporary files securely.
parent
a8098996
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
contrib/findoidjoins/make_oidjoins_check
contrib/findoidjoins/make_oidjoins_check
+16
-5
No files found.
contrib/findoidjoins/make_oidjoins_check
View file @
0f7a2a5f
...
...
@@ -10,12 +10,23 @@
# Caution: you may need to use GNU awk.
AWK
=
${
AWK
:-
awk
}
INPUTFILE
=
"tmp
$$
a"
DUPSFILE
=
"tmp
$$
b"
NONDUPSFILE
=
"tmp
$$
c"
rm
-f
$INPUTFILE
$DUPSFILE
$NONDUPSFILE
TMP
=
"/tmp/
$$
"
trap
"rm -rf
$TMP
"
0 1 2 3 15
trap
"rm -f
$INPUTFILE
$DUPSFILE
$NONDUPSFILE
"
0 1 2 3 15
# Create a temporary directory with the proper permissions so no one can
# intercept our temporary files and cause a security breach.
OMASK
=
"
`
umask
`
"
umask
077
if
!
mkdir
$TMP
then
echo
"Can't create temporary directory
$TMP
."
1>&2
exit
1
fi
umask
"
$OMASK
"
unset
OMASK
INPUTFILE
=
"
$TMP
/a"
DUPSFILE
=
"
$TMP
/b"
NONDUPSFILE
=
"
$TMP
/c"
# Read input
cat
"
$@
"
>
$INPUTFILE
...
...
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