summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:10:43 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:29:19 +0200
commitd246c7d9388e0ca16db9f6c17f438761022f4515 (patch)
tree1e4c6b200b7bf9fae6105b770b683e92486a0e64
parent1651fcb54a3690cb973fdadbda8e8130da1e351c (diff)
downloadtdebase-d246c7d9388e0ca16db9f6c17f438761022f4515.tar.gz
tdebase-d246c7d9388e0ca16db9f6c17f438761022f4515.zip
Fix tdm_greet crash
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--tdm/kfrontend/kgreeter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp
index cb38599c1..e6073da50 100644
--- a/tdm/kfrontend/kgreeter.cpp
+++ b/tdm/kfrontend/kgreeter.cpp
@@ -1296,13 +1296,14 @@ void ControlPipeHandlerObject::run(void) {
umask(0);
struct stat buffer;
int status;
- char *fifo_parent_dir = strdup(FIFO_DIR);
- dirname(fifo_parent_dir);
+ char *fifo_parent_dir;
+ char *fifo_dir = strdup(FIFO_DIR);
+ fifo_parent_dir = dirname(fifo_dir);
status = stat(fifo_parent_dir, &buffer);
if (status != 0) {
- mkdir(fifo_parent_dir, 0644);
+ mkdir(fifo_parent_dir, 0755);
}
- free(fifo_parent_dir);
+ free(fifo_dir);
status = stat(FIFO_DIR, &buffer);
if (status == 0) {
int file_mode = ((buffer.st_mode & S_IRWXU) >> 6) * 100;
@@ -1315,7 +1316,7 @@ void ControlPipeHandlerObject::run(void) {
return;
}
}
- mkdir(FIFO_DIR,0600);
+ mkdir(FIFO_DIR,0700);
mknod(mPipeFilename.ascii(), S_IFIFO|0600, 0);
chmod(mPipeFilename.ascii(), 0600);