commit 2a426294e5d5262361cf7f3c1781affa09f0bc70
parent 180dd13e4f3c5997954c4a27eee2fea51f1842b3
Author: Colin Leroy <colin@colino.net>
Date: Sat, 17 Jan 2009 16:46:23 +0000
2009-01-17 [colin] 3.7.0cvs38
* src/main.c
* src/mbox.c
* src/common/md5.c
* src/common/utils.c
* src/etpan/imap-thread.c
Fix g_open calls (which don't ignore mode)
Diffstat:
8 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-17 [colin] 3.7.0cvs38
+
+ * src/main.c
+ * src/mbox.c
+ * src/common/md5.c
+ * src/common/utils.c
+ * src/etpan/imap-thread.c
+ Fix g_open calls (which don't ignore mode)
+
2009-01-17 [colin] 3.7.0cvs37
* src/addressbook.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3699,3 +3699,4 @@
( cvs diff -u -r 1.52.2.72 -r 1.52.2.73 src/prefs_folder_item.c; ) > 3.7.0cvs35.patchset
( cvs diff -u -r 1.1.2.18 -r 1.1.2.19 manual/faq.xml; ) > 3.7.0cvs36.patchset
( cvs diff -u -r 1.60.2.128 -r 1.60.2.129 src/addressbook.c; cvs diff -u -r 1.382.2.494 -r 1.382.2.495 src/compose.c; cvs diff -u -r 1.26.2.41 -r 1.26.2.42 src/foldersel.c; cvs diff -u -r 1.115.2.218 -r 1.115.2.219 src/main.c; cvs diff -u -r 1.274.2.295 -r 1.274.2.296 src/mainwindow.c; cvs diff -u -r 1.28.2.44 -r 1.28.2.45 src/mbox.c; cvs diff -u -r 1.2.2.6 -r 1.2.2.7 src/common/md5.c; cvs diff -u -r 1.4.2.35 -r 1.4.2.36 src/common/ssl_certificate.c; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/common/tags.c; cvs diff -u -r 1.36.2.163 -r 1.36.2.164 src/common/utils.c; cvs diff -u -r 1.1.4.107 -r 1.1.4.108 src/etpan/imap-thread.c; cvs diff -u -r 1.1.2.39 -r 1.1.2.40 src/plugins/bogofilter/bogofilter.c; cvs diff -u -r 1.1.2.42 -r 1.1.2.43 src/plugins/pgpinline/pgpinline.c; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/smime/smime.c; ) > 3.7.0cvs37.patchset
+( cvs diff -u -r 1.115.2.219 -r 1.115.2.220 src/main.c; cvs diff -u -r 1.28.2.45 -r 1.28.2.46 src/mbox.c; cvs diff -u -r 1.2.2.7 -r 1.2.2.8 src/common/md5.c; cvs diff -u -r 1.36.2.164 -r 1.36.2.165 src/common/utils.c; cvs diff -u -r 1.1.4.108 -r 1.1.4.109 src/etpan/imap-thread.c; ) > 3.7.0cvs38.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=7
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=37
+EXTRA_VERSION=38
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/common/md5.c b/src/common/md5.c
@@ -355,7 +355,7 @@ md5_hex_digest_file(char *hexdigest, const unsigned char *file)
char *lastp = buf; /* point to the start of the buffer */
size_t total = 0; /* total length read */
int num_alloc = 1; /* number of blocks allocated */
- int fd = g_open(file, O_RDONLY);
+ int fd = g_open(file, O_RDONLY, 0);
if (fd == -1) {
FILE_OP_ERROR(file, "open");
diff --git a/src/common/utils.c b/src/common/utils.c
@@ -3165,7 +3165,7 @@ static gchar *file_read_to_str_full(const gchar *file, gboolean recode)
}
#else
/* test whether the file is readable without blocking */
- fd = g_open(file, O_RDONLY | O_NONBLOCK);
+ fd = g_open(file, O_RDONLY | O_NONBLOCK, 0);
if (fd == -1) {
FILE_OP_ERROR(file, "open");
return NULL;
diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c
@@ -2960,7 +2960,7 @@ static void append_run(struct etpan_thread_op * op)
}
size = stat_buf.st_size;
- fd = g_open(param->filename, O_RDONLY);
+ fd = g_open(param->filename, O_RDONLY, 0);
if (fd < 0) {
result->error = MAILIMAP_ERROR_APPEND;
return;
@@ -3246,7 +3246,7 @@ static void do_exec_command(int fd, const char * command,
/* Detach from the controlling tty if we have one. Otherwise,
SSH might do something stupid like trying to use it instead
of running $SSH_ASKPASS. Doh. */
- fd = g_open("/dev/tty", O_RDONLY);
+ fd = g_open("/dev/tty", O_RDONLY, 0);
if (fd != -1) {
ioctl(fd, TIOCNOTTY, NULL);
close(fd);
diff --git a/src/main.c b/src/main.c
@@ -2493,7 +2493,7 @@ static void install_memory_sighandler()
struct sigaction act;
int flags;
- mem_notify_fd = g_open("/dev/mem_notify", O_RDONLY|O_NONBLOCK);
+ mem_notify_fd = g_open("/dev/mem_notify", O_RDONLY|O_NONBLOCK, 0);
if (mem_notify_fd == -1) {
debug_print("/dev/mem_notify not available (%s)\n",
strerror(errno));
diff --git a/src/mbox.c b/src/mbox.c
@@ -358,9 +358,9 @@ gint lock_mbox(const gchar *base, LockType type)
#endif
#if HAVE_FLOCK
- if ((lockfd = g_open(base, O_RDWR)) < 0) {
+ if ((lockfd = g_open(base, O_RDWR, 0)) < 0) {
#else
- if ((lockfd = g_open(base, O_RDWR)) < 0) {
+ if ((lockfd = g_open(base, O_RDWR, 0)) < 0) {
#endif
FILE_OP_ERROR(base, "open");
return -1;