Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8a9cb724
Commit
8a9cb724
authored
May 27, 2012
by
Leigh B Stoller
Browse files
Remove temporary file.
parent
3650e27f
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCredential.pm.in
View file @
8a9cb724
#
!/usr/bin/perl -wT
#
#
GENIPUBLIC
-
COPYRIGHT
#
Copyright
(
c
)
2008
-
201
1
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2008
-
201
2
University
of
Utah
and
the
Flux
Group
.
#
All
rights
reserved
.
#
package
GeniCredential
;
...
...
@@ -708,10 +708,11 @@ sub Sign($$)
#
a
certificate
object
in
the
DB
.
#
my
$
certificate
;
my
$
certfile
;
if
(
ref
($
how
))
{
#
This
will
auto
delete
too
.
my
$
certfile
=
$
how
->
certfile
()
||
$
how
->
WriteToFile
(
1
);
$
certfile
=
$
how
->
certfile
()
||
$
how
->
WriteToFile
(
1
);
if
(
!defined($certfile)) {
print
STDERR
"Could not write $how to temp file
\n
"
;
return
-
1
;
...
...
@@ -756,6 +757,8 @@ sub Sign($$)
}
$
self
->{
'string'
}
=
$
credential
;
unlink
($
filename
);
unlink
($
certfile
)
if
(
defined
($
certfile
)
&&
-
e
$
certfile
);
return
0
;
}
...
...
Write
Preview
Supports
Markdown
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