[balsa] Make temporary file read-only



commit 273bc0830846389f7abb44003124c14c8b69bb57
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Jan 16 16:27:39 2010 -0500

    Make temporary file read-only
    
    2010-01-16  Peter Bloomfield
    
    	* libbalsa/body.c (libbalsa_message_body_save_temporary): make
    	temporary file read-only.

 ChangeLog       |    5 +++++
 libbalsa/body.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a655540..d912e6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-16  Peter Bloomfield
+
+	* libbalsa/body.c (libbalsa_message_body_save_temporary): make
+	temporary file read-only.
+
 2010-01-15  Pawel Salek
 
 	* libbalsa/imap/imap_compress.c:
diff --git a/libbalsa/body.c b/libbalsa/body.c
index 7bd0753..4a24a4e 100644
--- a/libbalsa/body.c
+++ b/libbalsa/body.c
@@ -325,7 +325,7 @@ libbalsa_message_body_save_temporary(LibBalsaMessageBody * body, GError **err)
                     g_build_filename(tempdir, filename, NULL);
                 fd = open(body->temp_filename,
                           O_WRONLY | O_EXCL | O_CREAT,
-                          LIBBALSA_MESSAGE_BODY_SAFE);
+                          S_IRUSR);
             }
         }
 
@@ -356,7 +356,7 @@ libbalsa_message_body_save_temporary(LibBalsaMessageBody * body, GError **err)
 	    return TRUE;
 	else
 	    return libbalsa_message_body_save(body, body->temp_filename,
-                                              LIBBALSA_MESSAGE_BODY_SAFE,
+                                              S_IRUSR,
                                               FALSE, err);
     }
 }



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