[evolution-ews] Fix open(O_CREAT) call without mode.



commit 8f005aae8b9f46cf6eb4cb0fae656c512aabf151
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed Jun 29 18:58:30 2011 +0100

    Fix open(O_CREAT) call without mode.
    
    Inâfunctionâ'open',
    ââââinlinedâfromâ'ews_soup_got_chunk'âatâe-ews-connection.c:1604:5:
    /usr/include/bits/fcntl2.h:51:24:âerror:âcallâtoâ'__open_missing_mode'â declaredâwithâattributeâerror:âopenâwithâO_CREATâinâsecondâargumentâ needsâ3âarguments
    
    Bad Chen. No biscuit.

 src/server/e-ews-connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 5879dd2..4a5c7a5 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1601,7 +1601,7 @@ ews_soup_got_chunk (SoupMessage *msg, SoupBuffer *chunk, gpointer user_data)
 		data->progress_fn (data->progress_data, pc);
 	}
 
-	fd = g_open (data->cache_filename, O_RDONLY | O_WRONLY | O_CREAT);
+	fd = g_open (data->cache_filename, O_RDONLY | O_WRONLY | O_CREAT, 0600);
 	if (fd != -1) {
 		if (write (fd, (const gchar*)chunk->data, chunk->length) != chunk->length) {
 			g_set_error (&data->error, EWS_CONNECTION_ERROR, EWS_CONNECTION_ERROR_UNKNOWN,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]