summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2005-05-17 15:12:51 +0000
committerdeva <deva>2005-05-17 15:12:51 +0000
commit1aaa53c45a2e56fb05cc170b3476e591980e1b1f (patch)
tree0f6db03a47fc9c429c1314b5f08316e12137ddb4 /src/server.cc
parente3710646f6557a1592fbffa910ebed674cd9edf0 (diff)
Fixed file rights (All read on files and directories, and all execute on directories).
Diffstat (limited to 'src/server.cc')
-rw-r--r--src/server.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server.cc b/src/server.cc
index ee14132..03f9552 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.16 2005/05/17 15:12:51 deva
+ * Fixed file rights (All read on files and directories, and all execute on directories).
+ *
* Revision 1.15 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -114,7 +117,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Check for cpr length correctness
if(strlen(cpr) != 11) {
int r = rand();
- fprintf(stderr, "Illigal CPR, it must have length 11, it had lentgh %d\n", strlen(cpr));
+ fprintf(stderr, "Illigal CPR, it must have length 11, it had length %d\n", strlen(cpr));
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);
sprintf(fname, "/tmp/miav-%d.mpg", r);
imgenc.encode(f, fname, 100); // Quality is between 0...100, where 100 is best.
@@ -128,7 +131,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Create folder named birthmonth in server root
sprintf(fname, "%s/%s", root->c_str(), birthmonth);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);
@@ -139,7 +142,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Create folder named cpr in serverroot/birthmonth
sprintf(fname, "%s/%s/%s", root->c_str(), birthmonth, cpr);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);