GUAC-1452: Fix typescript file creation permissions.

This commit is contained in:
Michael Jumper 2016-01-26 16:42:24 -08:00
parent 3f4bac3d04
commit cc76f2f4af

View File

@ -43,12 +43,16 @@ guac_terminal_typescript* guac_terminal_typescript_alloc(const char* path,
*/ */
/* Attempt to open typescript data file */ /* 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) if (data_fd == -1)
return NULL; return NULL;
/* Attempt to open typescript timing file */ /* 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) { if (timing_fd == -1) {
close(data_fd); close(data_fd);
return NULL; return NULL;