diff options
author | anselm@garbe.us <unknown> | 2012-02-11 17:51:48 +0100 |
---|---|---|
committer | anselm@garbe.us <unknown> | 2012-02-11 17:51:48 +0100 |
commit | 6af15aa636ae72f1cbd89ed93ea1e5b0c9ddfa02 (patch) | |
tree | 561729a715286844d9d6d59ee9d55c17409eb857 | |
parent | a0e269b6bd9d7a70148f4ccbc733df35f071ba74 (diff) | |
download | surf-6af15aa636ae72f1cbd89ed93ea1e5b0c9ddfa02.tar.gz surf-6af15aa636ae72f1cbd89ed93ea1e5b0c9ddfa02.tar.bz2 surf-6af15aa636ae72f1cbd89ed93ea1e5b0c9ddfa02.zip |
making cookie file creation a bit more pedantic
-rw-r--r-- | surf.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |