From cc76f2f4afb9a55d6ab3db5d1833d2c7fb104398 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 26 Jan 2016 16:42:24 -0800 Subject: [PATCH] GUAC-1452: Fix typescript file creation permissions. --- src/terminal/typescript.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/terminal/typescript.c b/src/terminal/typescript.c index 0727d188..ce4566dc 100644 --- a/src/terminal/typescript.c +++ b/src/terminal/typescript.c @@ -43,12 +43,16 @@ guac_terminal_typescript* guac_terminal_typescript_alloc(const char* path, */ /* Attempt to open typescript data file */ - data_fd = open("/tmp/typescript-data", O_CREAT | O_EXCL | O_WRONLY); + data_fd = open("/tmp/typescript-data", + O_CREAT | O_EXCL | O_WRONLY, + S_IRUSR | S_IWUSR); if (data_fd == -1) return NULL; /* Attempt to open typescript timing file */ - timing_fd = open("/tmp/typescript-timing", O_CREAT | O_EXCL | O_WRONLY); + timing_fd = open("/tmp/typescript-timing", + O_CREAT | O_EXCL | O_WRONLY, + S_IRUSR | S_IWUSR); if (timing_fd == -1) { close(data_fd); return NULL;