diff options
author | Stefan Knoblich <stkn@gentoo.org> | 2005-07-29 19:51:57 +0000 |
---|---|---|
committer | Stefan Knoblich <stkn@gentoo.org> | 2005-07-29 19:51:57 +0000 |
commit | 5e78112627303acb2ef4331fc177fa373a892b84 (patch) | |
tree | b4200bd346d3eedac5afd5506f1099fd4d0e8b93 /net-misc/asterisk | |
parent | old (diff) | |
download | gentoo-2-5e78112627303acb2ef4331fc177fa373a892b84.tar.gz gentoo-2-5e78112627303acb2ef4331fc177fa373a892b84.tar.bz2 gentoo-2-5e78112627303acb2ef4331fc177fa373a892b84.zip |
Added patch from uberlord to fix asterisk on hardened setups with ssp enabled, see Changelog and #100697 for more information
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r-- | net-misc/asterisk/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.0.8.ebuild | 6 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.0.9.ebuild | 6 | ||||
-rw-r--r-- | net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff | 229 |
4 files changed, 248 insertions, 3 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index 858119ff4eea..41bb988007b6 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/asterisk # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.71 2005/07/29 01:19:13 stkn Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.72 2005/07/29 19:51:57 stkn Exp $ + + 29 Jul 2005; <stkn@gentoo.org> + +files/1.0.0/asterisk-1.0.9-weak-references.diff, asterisk-1.0.9.ebuild, + asterisk-1.0.8.ebuild: + Added patch to mark adsi_* functions as weak references, this fixes loading + of res_features.so (= asterisk startup) on ssp enabled systems. Many thanks + to Uberlord (Roy Marples <uberlord@gentoo.org>) for examining the problem + and providing a patch. Closing #100697 and #85655. *asterisk-1.0.9 (29 Jul 2005) diff --git a/net-misc/asterisk/asterisk-1.0.8.ebuild b/net-misc/asterisk/asterisk-1.0.8.ebuild index b60bcd9fc26c..fadc49b4a127 100644 --- a/net-misc/asterisk/asterisk-1.0.8.ebuild +++ b/net-misc/asterisk/asterisk-1.0.8.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.8.ebuild,v 1.9 2005/07/25 22:45:03 stkn Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.8.ebuild,v 1.10 2005/07/29 19:51:57 stkn Exp $ inherit eutils perl-module @@ -122,6 +122,10 @@ src_unpack() { # hppa patch for gsm codec epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch + # mark adsi functions as weak references, things will blow + # on hardened otherwise (bug #100697 and possibly #85655) + epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-weak-references.diff + # gsm codec still uses -fomit-frame-pointer, and other codecs have their # own flags. We only change the arch. sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \ diff --git a/net-misc/asterisk/asterisk-1.0.9.ebuild b/net-misc/asterisk/asterisk-1.0.9.ebuild index bbf56e6f9488..ef7314fe1d4d 100644 --- a/net-misc/asterisk/asterisk-1.0.9.ebuild +++ b/net-misc/asterisk/asterisk-1.0.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.9.ebuild,v 1.1 2005/07/29 01:19:13 stkn Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.9.ebuild,v 1.2 2005/07/29 19:51:57 stkn Exp $ inherit eutils perl-module @@ -122,6 +122,10 @@ src_unpack() { # hppa patch for gsm codec epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch + # mark adsi functions as weak references, things will blow + # on hardened otherwise (bug #100697 and #85655) + epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-weak-references.diff + # gsm codec still uses -fomit-frame-pointer, and other codecs have their # own flags. We only change the arch. sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff new file mode 100644 index 000000000000..dfb46cc73908 --- /dev/null +++ b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff @@ -0,0 +1,229 @@ +diff -ru ../asterisk-1.0.9/include/asterisk/adsi.h ./include/asterisk/adsi.h +--- ../asterisk-1.0.9/include/asterisk/adsi.h 2005-07-29 13:22:39.003302450 +0100 ++++ ./include/asterisk/adsi.h 2005-07-29 13:41:41.000000000 +0100 +@@ -118,11 +118,14 @@ + * Returns 0 on success (or adsi unavailable) and -1 on hangup + * + */ +-extern int adsi_channel_init(struct ast_channel *chan); ++extern int adsi_channel_init(struct ast_channel *chan) ++ __attribute__ ((weak)); + +-extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version); ++extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version) ++ __attribute__ ((weak)); + +-extern int adsi_end_download(struct ast_channel *chan); ++extern int adsi_end_download(struct ast_channel *chan) ++ __attribute__ ((weak)); + + //! Restore ADSI initialization (for applications that play with ADSI + // and want to restore it to normal. If you touch "INFO" then you +@@ -133,7 +136,8 @@ + * Returns 0 on success (or adsi unavailable) and -1 on hangup + * + */ +-extern int adsi_channel_restore(struct ast_channel *chan); ++extern int adsi_channel_restore(struct ast_channel *chan) ++ __attribute__ ((weak)); + + //! Display some stuff on the screen + /*! +@@ -145,7 +149,8 @@ + * Return 0 on success (or adsi unavailable) and -1 on hangup + * + */ +-extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice); ++extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice) ++ __attribute__ ((weak)); + + //! Check if scripts for a given app are already loaded. Version may be -1 + // if any version is okay, or 0-255 for a specific version. +@@ -158,18 +163,23 @@ + * Returns 0 if scripts is not loaded or not an ADSI CPE. Returns -1 + * on hangup. Returns 1 if script already loaded. + */ +-extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data); +-extern int adsi_unload_session(struct ast_channel *chan); ++extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data) ++ __attribute__ ((weak)); ++extern int adsi_unload_session(struct ast_channel *chan) ++ __attribute__ ((weak)); + + /* ADSI Layer 2 transmission functions */ +-extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype); +-extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype); ++extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype) ++ __attribute__ ((weak)); ++extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype) ++ __attribute__ ((weak)); + + //! Read some encoded DTMF data. + /*! + * Returns number of bytes received + */ +-extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen); ++extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen) ++ __attribute__ ((weak)); + + /* ADSI Layer 3 creation functions */ + +@@ -183,14 +193,17 @@ + * + */ + +-extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver); ++extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver) ++ __attribute__ ((weak)); + + //! Build Query CPE ID of equipment */ + /*! + * Returns number of bytes added to message + */ +-extern int adsi_query_cpeid(unsigned char *buf); +-extern int adsi_query_cpeinfo(unsigned char *buf); ++extern int adsi_query_cpeid(unsigned char *buf) ++ __attribute__ ((weak)); ++extern int adsi_query_cpeinfo(unsigned char *buf) ++ __attribute__ ((weak)); + + //! Get CPE ID from an attached ADSI compatible CPE. + /*! +@@ -198,9 +211,11 @@ + * or -1 on hangup, or 0 if there was no hangup but it failed to find the + * device ID. Returns to voice mode if "voice" is non-zero. + */ +-extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice); ++extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice) ++ __attribute__ ((weak)); + +-extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice); ++extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice) ++ __attribute__ ((weak)); + + //! Begin an ADSI script download */ + /*! +@@ -214,7 +229,8 @@ + * + */ + +-extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver); ++extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver) ++ __attribute__ ((weak)); + + //! Disconnects a running session + /*! +@@ -223,7 +239,8 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_disconnect_session(unsigned char *buf); ++extern int adsi_disconnect_session(unsigned char *buf) ++ __attribute__ ((weak)); + + //! Disconnects (and hopefully saves) a downloaded script + /*! +@@ -232,7 +249,8 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_download_disconnect(unsigned char *buf); ++extern int adsi_download_disconnect(unsigned char *buf) ++ __attribute__ ((weak)); + + //! Puts CPE in data mode... + /*! +@@ -241,9 +259,12 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_data_mode(unsigned char *buf); +-extern int adsi_clear_soft_keys(unsigned char *buf); +-extern int adsi_clear_screen(unsigned char *buf); ++extern int adsi_data_mode(unsigned char *buf) ++ __attribute__ ((weak)); ++extern int adsi_clear_soft_keys(unsigned char *buf) ++ __attribute__ ((weak)); ++extern int adsi_clear_screen(unsigned char *buf) ++ __attribute__ ((weak)); + + //! Puts CPE in voice mode... + /*! +@@ -253,14 +274,16 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_voice_mode(unsigned char *buf, int when); ++extern int adsi_voice_mode(unsigned char *buf, int when) ++ __attribute__ ((weak)); + + //! Returns non-zero if Channel does or might support ADSI + /*! + * \param chan Channel to check + * + */ +-extern int adsi_available(struct ast_channel *chan); ++extern int adsi_available(struct ast_channel *chan) ++ __attribute__ ((weak)); + + //! Loads a line of info into the display */ + /*! +@@ -276,7 +299,8 @@ + * + */ + +-extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2); ++extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2) ++ __attribute__ ((weak)); + + //! Sets the current line and page */ + /*! +@@ -288,7 +312,8 @@ + * + */ + +-extern int adsi_set_line(unsigned char *buf, int page, int line); ++extern int adsi_set_line(unsigned char *buf, int page, int line) ++ __attribute__ ((weak)); + + //! Creates "load soft key" parameters + /*! +@@ -302,7 +327,8 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data); ++extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data) ++ __attribute__ ((weak)); + + //! Set which soft keys should be displayed + /*! +@@ -313,7 +339,8 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_set_keys(unsigned char *buf, unsigned char *keys); ++extern int adsi_set_keys(unsigned char *buf, unsigned char *keys) ++ __attribute__ ((weak)); + + //! Set input information + /*! +@@ -327,7 +354,8 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just); ++extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just) ++ __attribute__ ((weak)); + + //! Set input format + /*! +@@ -341,5 +369,6 @@ + * Returns number of bytes added to buffer or -1 on error. + * + */ +-extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2); ++extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2) ++ __attribute__ ((weak)); + #endif +Only in ../asterisk-1.0.9: .version |