Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
02cb2a3
)
callscgi: Fixed a couple of simple bugs.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 3 Sep 2010 04:45:53 +0000
(06:45 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 3 Sep 2010 04:45:53 +0000
(06:45 +0200)
src/callscgi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/callscgi.c
b/src/callscgi.c
index
c5b5499
..
243f323
100644
(file)
--- a/
src/callscgi.c
+++ b/
src/callscgi.c
@@
-98,13
+98,14
@@
static char *mkanonid(void)
home = getenv("HOME");
if(home && !access(sprintf3("%s/.ashd/sockets/", home), X_OK))
home = getenv("HOME");
if(home && !access(sprintf3("%s/.ashd/sockets/", home), X_OK))
- tmpl = sprintf2("%s/.ashd/sockets/scgi-a-XXXXXX");
+ tmpl = sprintf2("%s/.ashd/sockets/scgi-a-XXXXXX"
, home
);
else
tmpl = sprintf2("/tmp/scgi-a-%i-XXXXXX", getuid());
if((fd = mkstemp(tmpl)) < 0) {
flog(LOG_ERR, "could not create anonymous socket `%s': %s", tmpl, strerror(errno));
exit(1);
}
else
tmpl = sprintf2("/tmp/scgi-a-%i-XXXXXX", getuid());
if((fd = mkstemp(tmpl)) < 0) {
flog(LOG_ERR, "could not create anonymous socket `%s': %s", tmpl, strerror(errno));
exit(1);
}
+ close(fd);
unlink(tmpl);
return(tmpl);
}
unlink(tmpl);
return(tmpl);
}