tUse O_RDONLY when opening the datafile - ratox - FIFO based tox client
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit ab446bf99aed86e4e0955894f1019e35676c7fb5
(DIR) parent f7f067f23e6daf13a727fa81759e8dd72b167bb2
(HTM) Author: sin <sin@2f30.org>
Date: Mon, 22 Sep 2014 16:07:46 +0100
Use O_RDONLY when opening the datafile
Diffstat:
M ratox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/ratox.c b/ratox.c
t@@ -557,7 +557,7 @@ dataload(void)
uint8_t *data;
int fd;
- fd = open(DATAFILE, 0444);
+ fd = open(DATAFILE, O_RDONLY);
if (fd < 0) {
if (encryptdatafile == 1)
while (readpass("New passphrase: ") == -1);