aboutsummaryrefslogtreecommitdiffstats
path: root/smime
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 16:36:11 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 16:36:11 +0800
commita831a31bef95510a56cf438f26bfb09de9666a28 (patch)
tree4b407b67a6bf5244a80fc39ddefbff094eb2ae8c /smime
parentbc7c7799f09b81c85c5f0ff6e0bcdcbaf539f02b (diff)
downloadgsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar.gz
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar.bz2
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar.lz
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar.xz
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.tar.zst
gsoc2013-evolution-a831a31bef95510a56cf438f26bfb09de9666a28.zip
lib/e-cert-db.c Use gstdio wrappers. Open file in binary mode.
2005-12-18 Tor Lillqvist <tml@novell.com> * lib/e-cert-db.c * lib/e-pkcs12.c: Use gstdio wrappers. Open file in binary mode. svn path=/trunk/; revision=30858
Diffstat (limited to 'smime')
-rw-r--r--smime/ChangeLog3
-rw-r--r--smime/lib/e-cert-db.c7
-rw-r--r--smime/lib/e-pkcs12.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog
index 1e16cc28af..ba1edad6d3 100644
--- a/smime/ChangeLog
+++ b/smime/ChangeLog
@@ -9,6 +9,9 @@
* gui/e-cert-selector.c (e_cert_selector_new):
Construct glade file pathname at run-time.
+ * lib/e-cert-db.c
+ * lib/e-pkcs12.c: Use gstdio wrappers. Open file in binary mode.
+
2005-07-28 Mengjie Yu <meng-jie.yu@sun.com>
* lib/e-cert-db.c:
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index 5f415880e0..3104d7a716 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -60,6 +60,9 @@
#include <config.h>
#endif
+#include <glib.h>
+#include <glib/gstdio.h>
+
/* XXX toshok why oh *why* god WHY did they do this? no fucking
sense */
/* private NSS defines used by PSM */
@@ -85,10 +88,10 @@
#include "prprf.h"
#include "prmem.h"
#include "e-util/e-dialog-utils.h"
+#include "e-util/e-util-private.h"
#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
#include <libedataserverui/e-passwords.h>
-#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -1100,7 +1103,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
return FALSE;
}
- fd = open (file_path, O_RDONLY);
+ fd = g_open (file_path, O_RDONLY|O_BINARY, 0);
if (fd == -1) {
/* XXX gerror */
return FALSE;
diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c
index 12be49abc5..edb4286f73 100644
--- a/smime/lib/e-pkcs12.c
+++ b/smime/lib/e-pkcs12.c
@@ -60,6 +60,8 @@
#include <config.h>
#endif
+#include <glib.h>
+#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <libgnome/gnome-i18n.h>
#include <libedataserverui/e-passwords.h>
@@ -179,7 +181,7 @@ input_to_decoder (SEC_PKCS12DecoderContext *dcx, const char *path, GError **erro
FILE *fp;
/* open path */
- fp = fopen (path, "r");
+ fp = g_fopen (path, "rb");
if (!fp) {
/* XXX gerror */
printf ("couldn't open `%s'\n", path);