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 | fd0e64fcf14d078605b0adc6bbb7cb3651708b2d (patch) | |
tree | c754e8f9a01bdeeb0726a04d3ce46f4ed5de834e /net-misc/asterisk/files | |
parent | old (diff) | |
download | historical-fd0e64fcf14d078605b0adc6bbb7cb3651708b2d.tar.gz historical-fd0e64fcf14d078605b0adc6bbb7cb3651708b2d.tar.bz2 historical-fd0e64fcf14d078605b0adc6bbb7cb3651708b2d.zip |
Added patch from uberlord to fix asterisk on hardened setups with ssp enabled, see Changelog and #100697 for more information
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-misc/asterisk/files')
-rw-r--r-- | net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff | 229 |
1 files changed, 229 insertions, 0 deletions
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 |