/pidgin/main: 7f43656ee445: Merge revision 33421 from release-2.x.y
Richard Laager
rlaager at pidgin.im
Sun Jan 13 17:02:39 EST 2013
Changeset: 7f43656ee445833b3e7f826ec7e57c6652587f4d
Author: Richard Laager <rlaager at pidgin.im>
Date: 2013-01-13 14:53 -0600
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/7f43656ee445
Description:
Merge revision 33421 from release-2.x.y
diffstat:
.hgignore | 1 +
ChangeLog | 27 ++-
Makefile.mingw | 39 ++-
libpurple/Makefile.mingw | 17 +
libpurple/protocols/irc/Makefile.mingw | 7 +
libpurple/protocols/irc/irc.c | 32 ++-
libpurple/protocols/irc/irc.h | 18 +
libpurple/protocols/irc/msgs.c | 381 ++++++++++++++++++++++++++++++
libpurple/protocols/irc/parse.c | 13 +
libpurple/protocols/jabber/Makefile.mingw | 17 -
libpurple/protocols/myspace/message.c | 14 +-
libpurple/protocols/oscar/oscar.c | 7 +-
libpurple/win32/global.mak | 7 +-
pidgin/win32/nsis/generate_gtk_zip.sh | 89 +++++-
pidgin/win32/nsis/pidgin-installer.nsi | 47 +--
15 files changed, 626 insertions(+), 90 deletions(-)
diffs (truncated from 1152 to 300 lines):
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -10,6 +10,7 @@ syntax: regexp
.*/perl/common/MYMETA\.(json|yml)
.*~$
.*\.a$
+.*\.asc$
.*\.bak$
.*\.bs$
.*\.def$
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,10 @@ version 2.10.7:
* Fix a crash at startup with large contact list. Avatar support for
buddies will be disabled till 3.0.0. (#15226, #14305)
+ IRC:
+ * Support for SASL authentication. (Thijs Alkemade, Andy Spencer)
+ (#13270)
+
MSN:
* Fix a crash when removing a user before its icon is loaded. (Mark
Barfield) (#15217)
@@ -74,7 +78,28 @@ version 2.10.7:
Plugins:
* The Voice/Video Settings plugin supports using the sndio GStreamer
- backends. (Brad Smith) (#14414)
+ backends. (Brad Smith) (#14414)
+
+ Windows-Specific Changes:
+ * Compile with secure flags (#15290)
+ * Installer downloads GTK+ Runtime and Debug Symbols more securely.
+ (#15277)
+ * Updates to a number of dependencies, some of which have security
+ related fixes. (#14571, #15285, #15286)
+ * ATK 1.32.0-2
+ * Cyrus SASL 2.1.25
+ * expat 2.1.0-1
+ * freetype 2.4.10-1
+ * gettext 0.18.1.1-2
+ * Glib 2.28.8-1
+ * libpng 1.4.12-1
+ * libxml2 2.9.0-1
+ * NSS 3.13.6 and NSPR 4.9.2
+ * Pango 1.29.4-1
+ * SILC 1.1.10
+ * zlib 1.2.5-2
+ * Patch libmeanwhile (sametime library) to fix crash. (Jonathan Rice)
+ (#12637)
version 2.10.6 (07/06/2012):
Pidgin:
diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -31,7 +31,16 @@ awk 'BEGIN {FS="."} { \
exit; \
}' VERSION)
-GTK_INSTALL_VERSION = 2.16.6.0
+GTK_INSTALL_VERSION = 2.16.6.1
+
+authenticode_sign = $(MONO_SIGNCODE) \
+ -spc "$(SIGNCODE_SPC)" -v "$(SIGNCODE_PVK)" \
+ -a sha1 -$$ commercial \
+ -n "$(2)" -i "https://pidgin.im" \
+ -t "http://timestamp.verisign.com/scripts/timstamp.dll" -tr 10 \
+ $(1)
+
+gpg_sign = $(GPG_SIGN) -ab $(1) && $(GPG_SIGN) --verify $(1).asc
STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin
DEBUG_SYMBOLS_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-dbgsym
@@ -78,7 +87,7 @@ EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o
include $(PIDGIN_COMMON_RULES)
-.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)
+.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) gtk_runtime_zip
all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE)
@@ -102,10 +111,10 @@ endif
cp $(WIN32_DEV_TOP)/pidgin-inst-deps-20100315/exchndl.dll $(PIDGIN_INSTALL_DIR)
cp $(GCC_SSP_TOP)/bin/libssp-0.dll $(PIDGIN_INSTALL_DIR)
-pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip:
- pidgin/win32/nsis/generate_gtk_zip.sh `pwd`
+gtk_runtime_zip:
+ pidgin/win32/nsis/generate_gtk_zip.sh "`pwd`" "$(GPG_SIGN)"
-generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip debug_symbols_zip $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop
+generate_installer_includes: create_release_install_dir gtk_runtime_zip debug_symbols_zip $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop
rm -f pidgin/win32/nsis/pidgin-translations.nsh pidgin/win32/nsis/pidgin-spellcheck.nsh pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
find $(STRIPPED_RELEASE_DIR)/locale -maxdepth 1 -mindepth 1 \
-exec basename {} ';' \
@@ -139,18 +148,32 @@ create_release_install_dir: install
find $(STRIPPED_RELEASE_DIR) \( -name '*.dll' -o -name '*.exe' \) \
-not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) \
-exec $(STRIP) --strip-unneeded {} ';'
+ $(call authenticode_sign, $(STRIPPED_RELEASE_DIR)/pidgin.exe, "Pidgin $(PIDGIN_VERSION)")
installer: generate_installer_includes
- $(MAKENSIS) -V3 -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" -DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
+ $(eval $@_DEBUG_SYMBOLS_SHA1SUM := $(shell sha1sum $(DEBUG_SYMBOLS_DIR).zip | sed -e "s/\ .*$$//"))
+ $(eval $@_GTK_SHA1SUM := $(shell sha1sum pidgin/win32/nsis/gtk-runtime-$(GTK_INSTALL_VERSION).zip | sed -e "s/\ .*$$//"))
+ $(MAKENSIS) -V3 -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" \
+ -DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" \
+ -DDEBUG_SYMBOLS_SHA1SUM="$($@_DEBUG_SYMBOLS_SHA1SUM)" -DGTK_SHA1SUM="$($@_GTK_SHA1SUM)"\
+ pidgin/win32/nsis/pidgin-installer.nsi
+ $(call authenticode_sign, pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe, "Pidgin Installer")
mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./
+ $(call gpg_sign, pidgin-$(PIDGIN_VERSION).exe)
installer_offline: generate_installer_includes
- $(MAKENSIS) -V3 -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" -DOFFLINE_INSTALLER -DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
+ $(MAKENSIS) -V3 -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" \
+ -DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" \
+ -DOFFLINE_INSTALLER \
+ pidgin/win32/nsis/pidgin-installer.nsi
+ $(call authenticode_sign, pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe, "Pidgin Installer")
mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe ./
+ $(call gpg_sign, pidgin-$(PIDGIN_VERSION)-offline.exe)
installer_zip: create_release_install_dir
rm -f pidgin-$(PIDGIN_VERSION)-win32-bin.zip
zip -9 -r pidgin-$(PIDGIN_VERSION)-win32-bin.zip $(STRIPPED_RELEASE_DIR)
+ $(call gpg_sign, pidgin-$(PIDGIN_VERSION)-win32-bin.zip)
debug_symbols_zip: install
rm -rf $(DEBUG_SYMBOLS_DIR) $(DEBUG_SYMBOLS_DIR).zip
@@ -158,7 +181,9 @@ debug_symbols_zip: install
tar -cf - `find $(PIDGIN_INSTALL_DIR) \( -name '*.dll' -o -name '*.exe' \) \
-not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) -print` \
| tar --strip 2 --xform s/$$/.dbgsym/ -xC $(DEBUG_SYMBOLS_DIR) -f -
+ cp $(MEANWHILE_TOP)/bin/libmeanwhile-1.dll.unstripped $(DEBUG_SYMBOLS_DIR)/libmeanwhile-1.dll.dbgsym
zip -9 -r $(DEBUG_SYMBOLS_DIR).zip $(DEBUG_SYMBOLS_DIR)
+ $(call gpg_sign, $(DEBUG_SYMBOLS_DIR).zip)
installers: installer installer_offline debug_symbols_zip installer_zip
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -10,6 +10,19 @@ include $(PIDGIN_TREE_TOP)/libpurple/win
TARGET = libpurple
NEEDED_DLLS = $(LIBXML2_TOP)/bin/libxml2-2.dll
+ifeq ($(CYRUS_SASL), 1)
+NEEDED_DLLS += $(CYRUS_SASL_TOP)/bin/libsasl.dll
+
+CYRUS_SASL_PLUGINS = \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslANONYMOUS.dll \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslCRAMMD5.dll \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslDIGESTMD5.dll \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslGSSAPI.dll \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslLOGIN.dll \
+ $(CYRUS_SASL_TOP)/bin/sasl2/saslPLAIN.dll
+
+endif
+
##
## INCLUDE PATHS
##
@@ -123,6 +136,10 @@ all: $(TARGET).dll
install_shallow: $(PURPLE_INSTALL_DIR) $(TARGET).dll
cp $(TARGET).dll $(PURPLE_INSTALL_DIR)
cp $(NEEDED_DLLS) $(PURPLE_INSTALL_DIR)
+ifeq ($(CYRUS_SASL), 1)
+ mkdir -p $(PURPLE_INSTALL_DIR)/sasl2
+ cp $(CYRUS_SASL_PLUGINS) $(PURPLE_INSTALL_DIR)/sasl2
+endif
install: install_shallow all
$(MAKE) -C $(PURPLE_PROTOS_TOP) -f $(MINGW_MAKEFILE) install
diff --git a/libpurple/protocols/irc/Makefile.mingw b/libpurple/protocols/irc/Makefile.mingw
--- a/libpurple/protocols/irc/Makefile.mingw
+++ b/libpurple/protocols/irc/Makefile.mingw
@@ -54,6 +54,13 @@ LIBS = \
-lintl \
-lpurple
+
+ifeq ($(CYRUS_SASL), 1)
+INCLUDE_PATHS += -I$(CYRUS_SASL_TOP)/include
+LIB_PATHS += -L$(CYRUS_SASL_TOP)/bin
+LIBS += -llibsasl
+endif
+
include $(PIDGIN_COMMON_RULES)
##
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -155,6 +155,7 @@ int irc_send_len(struct irc_conn *irc, c
char *tosend= g_strdup(buf);
purple_signal_emit(_irc_plugin, "irc-sending-text", purple_account_get_connection(irc->account), &tosend);
+
if (tosend == NULL)
return 0;
@@ -393,9 +394,17 @@ static gboolean do_login(PurpleConnectio
const char *username, *realname;
struct irc_conn *irc = purple_connection_get_protocol_data(gc);
const char *pass = purple_connection_get_password(gc);
+#ifdef HAVE_CYRUS_SASL
+ const gboolean use_sasl = purple_account_get_bool(irc->account, "sasl", FALSE);
+#endif
if (pass && *pass) {
- buf = irc_format(irc, "v:", "PASS", pass);
+#ifdef HAVE_CYRUS_SASL
+ if (use_sasl)
+ buf = irc_format(irc, "vv:", "CAP", "REQ", "sasl");
+ else /* intended to fall through */
+#endif
+ buf = irc_format(irc, "v:", "PASS", pass);
if (irc_send(irc, buf) < 0) {
g_free(buf);
return FALSE;
@@ -529,6 +538,17 @@ static void irc_close(PurpleConnection *
g_free(irc->mode_chars);
g_free(irc->reqnick);
+#ifdef HAVE_CYRUS_SASL
+ if (irc->sasl_conn) {
+ sasl_dispose(&irc->sasl_conn);
+ irc->sasl_conn = NULL;
+ }
+ g_free(irc->sasl_cb);
+ if(irc->sasl_mechs)
+ g_string_free(irc->sasl_mechs, TRUE);
+#endif
+
+
g_free(irc);
}
@@ -1047,6 +1067,16 @@ static void _init_plugin(PurplePlugin *p
option = purple_account_option_bool_new(_("Use SSL"), "ssl", FALSE);
prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
+#ifdef HAVE_CYRUS_SASL
+ option = purple_account_option_bool_new(_("Authenticate with SASL"), "sasl", FALSE);
+ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
+
+ option = purple_account_option_bool_new(
+ _("Allow plaintext SASL auth over unencrypted connection"),
+ "auth_plain_in_clear", FALSE);
+ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
+#endif
+
_irc_plugin = plugin;
purple_prefs_remove("/plugins/prpl/irc/quitmsg");
diff --git a/libpurple/protocols/irc/irc.h b/libpurple/protocols/irc/irc.h
--- a/libpurple/protocols/irc/irc.h
+++ b/libpurple/protocols/irc/irc.h
@@ -25,6 +25,10 @@
#include <glib.h>
+#ifdef HAVE_CYRUS_SASL
+#include <sasl/sasl.h>
+#endif
+
#include "circbuffer.h"
#include "ft.h"
#include "roomlist.h"
@@ -93,6 +97,13 @@ struct irc_conn {
char *mode_chars;
char *reqnick;
gboolean nickused;
+#ifdef HAVE_CYRUS_SASL
+ sasl_conn_t *sasl_conn;
+ const char *current_mech;
+ GString *sasl_mechs;
+ gboolean mech_works;
+ sasl_callback_t *sasl_cb;
+#endif
};
struct irc_buddy {
@@ -168,6 +179,13 @@ void irc_msg_unknown(struct irc_conn *ir
void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args);
void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args);
void irc_msg_who(struct irc_conn *irc, const char *name, const char *from, char **args);
+#ifdef HAVE_CYRUS_SASL
+void irc_msg_cap(struct irc_conn *irc, const char *name, const char *from, char **args);
+void irc_msg_auth(struct irc_conn *irc, char *arg);
+void irc_msg_authok(struct irc_conn *irc, const char *name, const char *from, char **args);
+void irc_msg_authtryagain(struct irc_conn *irc, const char *name, const char *from, char **args);
+void irc_msg_authfail(struct irc_conn *irc, const char *name, const char *from, char **args);
+#endif
More information about the Commits
mailing list