pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0e269b
)
making cookie file creation a bit more pedantic
author
anselm@garbe.us
<unknown>
Sat, 11 Feb 2012 16:51:48 +0000
(17:51 +0100)
committer
anselm@garbe.us
<unknown>
Sat, 11 Feb 2012 16:51:48 +0000
(17:51 +0100)
surf.c
patch
|
blob
|
history
diff --git
a/surf.c
b/surf.c
index
bff621b
..
154957d
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-128,11
+128,14
@@
buildpath(const char *path) {
if((p = strrchr(apath, '/'))) {
*p = '\0';
g_mkdir_with_parents(apath, 0700);
+ g_chmod(apath, 0700); /* in case it existed */
*p = '/';
}
/* creating file (gives error when apath ends with "/") */
- if((f = fopen(apath, "a")))
+ if((f = fopen(apath, "a"))) {
+ g_chmod(apath, 0600); /* always */
fclose(f);
+ }
return apath;
}