diff options
Diffstat (limited to 'net-misc/asterisk/files/1.0.0')
26 files changed, 0 insertions, 1864 deletions
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch deleted file mode 100644 index 41e646725c7a..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: formats/format_jpeg.c -=================================================================== ---- formats/format_jpeg.c (.../1.2.6) (revision 19610) -+++ formats/format_jpeg.c (.../1.2.7) (revision 19610) -@@ -55,7 +55,7 @@ - struct ast_frame fr; - int res; - char buf[65536]; -- if (len > sizeof(buf)) { -+ if (len > sizeof(buf) || len < 0) { - ast_log(LOG_WARNING, "JPEG image too large to read\n"); - return NULL; - } diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch deleted file mode 100644 index a11b23dfb895..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: channel.c -=================================================================== -RCS file: /usr/cvsroot/asterisk/channel.c,v -retrieving revision 1.139.2.11 -diff -u -r1.139.2.11 channel.c ---- channel.c 5 Aug 2005 00:02:09 -0000 1.139.2.11 -+++ channel.c 11 Oct 2005 04:20:20 -0000 -@@ -381,6 +381,12 @@ - } - ast_mutex_lock(&chan->lock); - prev = NULL; -+ -+ if (!chan->pvt ) { -+ ast_log(LOG_WARNING, "chan->pvt == NULL!!"); -+ ast_mutex_unlock(&chan->lock); -+ return -1; -+ } - cur = chan->pvt->readq; - while(cur) { - if ((cur->frametype == AST_FRAME_CONTROL) && (cur->subclass == AST_CONTROL_HANGUP)) { diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch deleted file mode 100644 index a441ee0b2eae..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch +++ /dev/null @@ -1,260 +0,0 @@ ---- trunk/contrib/scripts/vmail.cgi 2004/09/15 05:11:41 3781 -+++ trunk/contrib/scripts/vmail.cgi 2005/10/30 16:30:35 6896 -@@ -11,10 +11,15 @@ - # (icky, I know.... if you know better perl please help!) - # - # -+# Synchronization added by GDS Partners (www.gdspartners.com) -+# Stojan Sljivic (stojan.sljivic@gdspartners.com) -+# - use CGI qw/:standard/; - use Carp::Heavy; - use CGI::Carp qw(fatalsToBrowser); - use DBI; -+use Fcntl qw ( O_WRONLY O_CREAT O_EXCL ); -+use Time::HiRes qw ( usleep ); - - $context=""; # Define here your by default context (so you dont need to put voicemail@context in the login - -@@ -44,6 +49,57 @@ - $footer = "<hr><font size=-1><a href=\"http://www.asterisk.org\">The Asterisk Open Source PBX</a> Copyright 2004, <a href=\"http://www.digium.com\">Digium, Inc.</a></a>"; - $stdcontainerend = "</td></tr><tr><td align=right>$footer</td></tr></table>\n"; - -+sub lock_path() { -+ -+ my($path) = @_; -+ my $rand; -+ my $rfile; -+ my $start; -+ my $res; -+ -+ $rand = rand 99999999; -+ $rfile = "$path/.lock-$rand"; -+ -+ sysopen(RFILE, $rfile, O_WRONLY | O_CREAT | O_EXCL, 0666) or return -1; -+ close(RFILE); -+ -+ $res = link($rfile, "$path/.lock"); -+ $start = time; -+ if ($res == 0) { -+ while (($res == 0) && (time - $start <= 5)) { -+ $res = link($rfile, "$path/.lock"); -+ usleep(1); -+ } -+ } -+ unlink($rfile); -+ -+ if ($res == 0) { -+ return -1; -+ } else { -+ return 0; -+ } -+} -+ -+sub unlock_path() { -+ -+ my($path) = @_; -+ -+ unlink("$path/.lock"); -+} -+ -+sub untaint() { -+ -+ my($data) = @_; -+ -+ if ($data =~ /^([-\@\w.]+)$/) { -+ $data = $1; -+ } else { -+ die "Security violation."; -+ } -+ -+ return $data; -+} -+ - sub login_screen() { - print header; - my ($message) = @_; -@@ -120,7 +176,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select fullname,context from users where mailbox='$mbox' and password='$pass' and context='$context'}); -+ my $sth = $dbh->prepare(qq{select fullname,context from voicemail where mailbox='$mbox' and password='$pass' and context='$context'}); - $sth->execute(); - if (($fullname, $category) = $sth->fetchrow_array()) {; - return ($fullname ? $fullname : "Extension $mbox in $context",$category); -@@ -184,7 +240,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select fullname,context from users where mailbox='$mbox' and password='$pass' and context='$context'}); -+ my $sth = $dbh->prepare(qq{select fullname,context from voicemail where mailbox='$mbox' and password='$pass' and context='$context'}); - $sth->execute(); - if (($fullname, $category) = $sth->fetchrow_array()) {; - return ($fullname ? $fullname : "unknown", $category); -@@ -242,7 +298,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select mailbox,fullname,context from users where context='$context' order by mailbox}); -+ my $sth = $dbh->prepare(qq{select mailbox,fullname,context from voicemail where context='$context' order by mailbox}); - $sth->execute(); - while (($mailbox, $fullname, $category) = $sth->fetchrow_array()) { - $text = $mailbox; -@@ -489,14 +545,16 @@ - sub message_audio() - { - my ($forcedownload) = @_; -- my $folder = param('folder'); -- my $msgid = param('msgid'); -- my $mailbox = param('mailbox'); -- my $context = param('context'); -+ my $folder = &untaint(param('folder')); -+ my $msgid = &untaint(param('msgid')); -+ my $mailbox = &untaint(param('mailbox')); -+ my $context = &untaint(param('context')); - my $format = param('format'); - if (!$format) { - $format = &getcookie('format'); - } -+ &untaint($format); -+ - my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format"; - - $msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!"); -@@ -719,6 +777,8 @@ - } - - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder"; - opendir(DIR, $path) || die("Unable to open directory\n"); -@@ -742,6 +802,10 @@ - my ($orig, $new) = @_; - my $res; - my $data; -+ $orig =~ /^(.*)$/; -+ $orig = $1; -+ $new =~ /^(.*)$/; -+ $new = $1; - open(IN, "<$orig") || die("Unable to open '$orig'\n"); - open(OUT, ">$new") || DIE("Unable to open '$new'\n"); - while(($res = sysread(IN, $data, 4096)) > 0) { -@@ -788,8 +852,12 @@ - } - - my $path = "/var/spool/asterisk/voicemail/$context/$newmbox"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder"; - opendir(DIR, $path) || die("Unable to open directory\n"); -@@ -863,19 +931,29 @@ - die("Bah! Not a valid mailbox '$newmbox'\n"); - return ""; - } -- $msgcount = &msgcount($context, $newmbox, "INBOX"); -+ - my $txt; -- if ($newmbox ne $mbox) { --# print header; -- foreach $msg (@msgs) { --# print "Forwarding $msg from $mbox to $newmbox<BR>\n"; -- &message_copy($context, $mbox, $newmbox, $folder, $msg, sprintf "%04d", $msgcount); -- $msgcount++; -+ $context = &untaint($context); -+ $newmbox = &untaint($newmbox); -+ my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX"; -+ if (&lock_path($path) == 0) { -+ $msgcount = &msgcount($context, $newmbox, "INBOX"); -+ -+ if ($newmbox ne $mbox) { -+# print header; -+ foreach $msg (@msgs) { -+# print "Forwarding $msg from $mbox to $newmbox<BR>\n"; -+ &message_copy($context, $mbox, $newmbox, $folder, $msg, sprintf "%04d", $msgcount); -+ $msgcount++; -+ } -+ $txt = "Forwarded messages " . join(', ', @msgs) . "to $newmbox"; -+ } else { -+ $txt = "Can't forward messages to yourself!\n"; - } -- $txt = "Forwarded messages " . join(', ', @msgs) . "to $newmbox"; -+ &unlock_path($path); - } else { -- $txt = "Can't forward messages to yourself!\n"; -- } -+ $txt = "Cannot forward messages: Unable to lock path.\n"; -+ } - if ($toindex) { - &message_index($folder, $txt); - } else { -@@ -900,33 +978,42 @@ - $context = "default"; - } - my $passwd = param('password'); -- my $msgcount = &msgcount($context, $mbox, $folder); -- my $omsgcount = &msgcount($context, $mbox, $newfolder) if $newfolder; --# print header; -- if ($newfolder ne $folder) { -- $y = 0; -- for ($x=0;$x<$msgcount;$x++) { -- my $msg = sprintf "%04d", $x; -- my $newmsg = sprintf "%04d", $y; -- if (grep(/^$msg$/, @msgs)) { -- if ($newfolder) { -- &message_rename($context, $mbox, $folder, $msg, $newfolder, sprintf "%04d", $omsgcount); -- $omsgcount++; -+ $context = &untaint($context); -+ $mbox = &untaint($mbox); -+ $folder = &untaint($folder); -+ my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder"; -+ if (&lock_path($path) == 0) { -+ my $msgcount = &msgcount($context, $mbox, $folder); -+ my $omsgcount = &msgcount($context, $mbox, $newfolder) if $newfolder; -+ # print header; -+ if ($newfolder ne $folder) { -+ $y = 0; -+ for ($x=0;$x<$msgcount;$x++) { -+ my $msg = sprintf "%04d", $x; -+ my $newmsg = sprintf "%04d", $y; -+ if (grep(/^$msg$/, @msgs)) { -+ if ($newfolder) { -+ &message_rename($context, $mbox, $folder, $msg, $newfolder, sprintf "%04d", $omsgcount); -+ $omsgcount++; -+ } else { -+ &message_delete($context, $mbox, $folder, $msg); -+ } - } else { -- &message_delete($context, $mbox, $folder, $msg); -+ &message_rename($context, $mbox, $folder, $msg, $folder, $newmsg); -+ $y++; - } -+ } -+ if ($del) { -+ $txt = "Deleted messages " . join (', ', @msgs); - } else { -- &message_rename($context, $mbox, $folder, $msg, $folder, $newmsg); -- $y++; -+ $txt = "Moved messages " . join (', ', @msgs) . " to $newfolder"; - } -- } -- if ($del) { -- $txt = "Deleted messages " . join (', ', @msgs); - } else { -- $txt = "Moved messages " . join (', ', @msgs) . " to $newfolder"; -+ $txt = "Can't move a message to the same folder they're in already"; - } -+ &unlock_path($path); - } else { -- $txt = "Can't move a message to the same folder they're in already"; -+ $txt = "Cannot move/delete messages: Unable to lock path.\n"; - } - # Not as many messages now - $msgcount--; diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff deleted file mode 100644 index 90bc007b16de..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff +++ /dev/null @@ -1,229 +0,0 @@ ---- asterisk-1.0.10/include/asterisk/adsi.h.orig 2005-06-25 00:27:10.000000000 +0200 -+++ asterisk-1.0.10/include/asterisk/adsi.h 2005-11-22 22:45:31.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,24 @@ - * 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_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait); -+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)); -+extern int adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait) -+ __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 +194,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 +212,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 +230,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 +240,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 +250,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 +260,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 +275,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 +300,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 +313,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 +328,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 +340,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 +355,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 +370,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 diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch deleted file mode 100644 index ef79a5371023..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch +++ /dev/null @@ -1,30 +0,0 @@ -Ports from <http://svn.digium.com/view/asterisk?rev=57478&view=rev>, -<http://svn.digium.com/view/asterisk?rev=59038&view=rev> -More information at <http://bugs.gentoo.org/169616> and -<http://bugs.gentoo.org/171467>. ---- asterisk-1.0.12/channels/chan_sip.c 2005-11-29 13:24:39.000000000 -0500 -+++ asterisk-1.0.12-r2/channels/chan_sip.c 2007-03-19 15:32:08.000000000 -0400 -@@ -7293,6 +7293,12 @@ - increasing */ - p->icseq = seqno; - -+ if (!e && (strcasecmp(cmd, "INVITE") == 0 || strcasecmp(cmd, "SUBSCRIBE") == 0 || strcasecmp(cmd, "REGISTER") == 0 || strcasecmp(cmd, "NOTIFY") == 0)) { -+ transmit_response(p, "503 Server error", req); -+ p->needdestroy = 1; -+ return -1; -+ } -+ - /* Initialize the context if it hasn't been already */ - if (!strcasecmp(cmd, "OPTIONS")) { - res = get_destination(p, req); -@@ -7790,6 +7796,10 @@ - if (sscanf(e, "%i %n", &respid, &len) != 1) { - ast_log(LOG_WARNING, "Invalid response: '%s'\n", e); - } else { -+ if (respid <= 0) { -+ ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid); -+ return 0; -+ } - handle_response(p, respid, e + len, req,ignore); - } - } else { diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff deleted file mode 100644 index 9d977a05fd7f..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff +++ /dev/null @@ -1,216 +0,0 @@ -diff -Nau asterisk-1.0.2-orig/Makefile asterisk-1.0.2/Makefile ---- asterisk-1.0.2-orig/Makefile 2004-10-03 20:37:37.000000000 +0200 -+++ asterisk-1.0.2/Makefile 2004-11-21 23:09:08.969201360 +0100 -@@ -221,6 +221,7 @@ - - CC=gcc - INSTALL=install -+SED=sed - - _all: all - @echo " +--------- Asterisk Build Complete ---------+" -@@ -231,7 +232,7 @@ - @echo " + $(MAKE) install +" - @echo " +-------------------------------------------+" - --all: depend asterisk subdirs -+all: depend asterisk asterisk-config subdirs - - editline/config.h: - cd editline && unset CFLAGS LIBS && ./configure ; \ -@@ -295,6 +296,20 @@ - asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS) - $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) - -+asterisk-config: asterisk-config.in -+ $(SED) \ -+ -e "s:@SOLINK@:$(SOLINK):" -e "s:@VERSION@:$(ASTERISKVERSION):" \ -+ -e "s:@ETCDIR@:$(ASTETCDIR):" -e "s:@LIBDIR@:$(ASTLIBDIR):" \ -+ -e "s:@CFLAGS@:$(CFLAGS):" -e "s:@VARRUNDIR@:$(ASTVARRUNDIR):" \ -+ -e "s:@LIBS@:$(LIBS):" -e "s:@VARLIBDIR@:$(ASTVARLIBDIR):" \ -+ -e "s:@LOGDIR@:$(ASTLOGDIR):" -e "s:@SPOOLDIR@:$(ASTSPOOLDIR):" \ -+ -e "s:@AGIDIR@:$(AGI_DIR):" -e "s:@MODDIR@:$(MODULES_DIR):" \ -+ -e "s:@BINDIR@:$(ASTBINDIR):" -e "s:@SBINDIR@:$(ASTSBINDIR):" \ -+ -e "s:@MANDIR@:$(ASTMANDIR):" \ -+ -e "s:@INCDIR@:$(ASTHEADERDIR):" \ -+ -e "s:@PREFIX@:$(INSTALL_PREFIX):" \ -+ asterisk-config.in > $@ -+ - muted: muted.o - $(CC) -o muted muted.o - -@@ -303,7 +318,7 @@ - - clean: - for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done -- rm -f *.o *.so asterisk .depend -+ rm -f *.o *.so asterisk .depend asterisk-config - rm -f build.h - rm -f ast_expr.c - @if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi -@@ -373,6 +388,7 @@ - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp - install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ install -m 755 asterisk-config $(DESTDIR)$(ASTBINDIR)/ - install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ - if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \ - install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\ -Common subdirectories: asterisk-1.0.2-orig/agi and asterisk-1.0.2/agi -Common subdirectories: asterisk-1.0.2-orig/apps and asterisk-1.0.2/apps -diff -Nau asterisk-1.0.2-orig/asterisk-config.in asterisk-1.0.2/asterisk-config.in ---- asterisk-1.0.2-orig/asterisk-config.in 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.0.2/asterisk-config.in 2004-11-21 23:11:29.129893696 +0100 -@@ -0,0 +1,152 @@ -+#!/bin/sh -+# -+# asterisk-config -+# -+# Copyright (C) 2004 Stefan Knoblich <stkn@gentoo.org> -+# -+ -+# /* -+# Changes: -+# -+# 0.0.2 (stkn: 20041121) -+# Clean-ups, renamed some options (more configure alike) -+# -+# 0.0.1 (stkn: 20041114) -+# Yeah it's ugly as hell, but it does it's job -+# */ -+ -+## -+# These get replaced by sed... -+# -+ -+SOLINK='@SOLINK@' -+CFLAGS='@CFLAGS@' -+LIBS='@LIBS@' -+ -+AST_PREFIX=@PREFIX@ -+AST_LIBDIR=@LIBDIR@ -+AST_ETCDIR=@ETCDIR@ -+AST_MODDIR=@MODDIR@ -+AST_AGIDIR=@AGIDIR@ -+AST_INCDIR=@INCDIR@ -+AST_MANDIR=@MANDIR@ -+AST_LOGDIR=@LOGDIR@ -+AST_VARLIBDIR=@VARLIBDIR@ -+AST_VARRUNDIR=@VARRUNDIR@ -+AST_SPOOLDIR=@SPOOLDIR@ -+AST_CONFPATH=@CFGPATH@ -+AST_VERSION=@VERSION@ -+ -+## -+# Don't even think about touching anything below... -+# -+ -+usage() { -+ echo "asterisk-config <options>" -+ echo "" -+ echo "* About asterisk (outputs first option only)" -+ echo "" -+ echo " --version | -v Asterisk version" -+ echo "" -+ echo "* Build time stuff" -+ echo "" -+ echo " --libs Libraries used by asterisk" -+ echo " --cflags Cflags used during building" -+ echo " --solink Option for linking modules" -+ echo "" -+ echo "* Paths" -+ echo "" -+ echo " --prefix Installation prefix" -+ echo " --bindir Location of user-accessible binaries" -+ echo " --sbindir Location of system binaries" -+ echo " --sysconfdir Directory for config files" -+ echo " --mandir Place for man-pages" -+ echo " --libdir Libraries are put there" -+ echo " --modulesdir Asterisk keeps it's modules here" -+ echo " --agidir AGI files belong there" -+ echo " --logdir The place for logfiles" -+ echo " --spooldir Asterisk's spool directory" -+ echo " --includesdir Include files" -+ echo "" -+} -+ -+ -+if [ $# -lt 1 ]; then -+ usage -+ exit 0 -+fi -+ -+# -+# single-use options -+# -+while [ $# -gt 0 ]; do -+ case $1 in -+ --help|-h) -+ usage -+ ;; -+ --version|-v) -+ echo ${AST_VERSION} -+ ;; -+ # paths -+ --prefix) -+ echo -n ${AST_PREFIX} -+ ;; -+ --sysconfdir) -+ echo -n ${AST_ETCDIR} -+ ;; -+ --libexecdir|--sbindir) -+ echo -n ${AST_SBINDIR} -+ ;; -+ --bindir) -+ echo -n ${AST_BINDIR} -+ ;; -+ --modulesdir) -+ echo -n ${AST_MODDIR} -+ ;; -+ --agidir) -+ echo -n ${AST_AGIDIR} -+ ;; -+ --mandir) -+ echo -n ${AST_MANDIR} -+ ;; -+ --logdir) -+ echo -n ${AST_LOGDIR} -+ ;; -+ --includedir) -+ echo -n ${AST_INCDIR} -+ ;; -+ --spooldir) -+ echo -n ${AST_SPOOLDIR} -+ ;; -+ --libdir) -+ echo -n ${AST_LIBDIR} -+ ;; -+ --varrundir) -+ echo -n ${AST_VARRUNDIR} -+ ;; -+ --varlibdir) -+ echo -n ${AST_VARLIBDIR} -+ ;; -+ # flags and stuff -+ --solink) -+ echo -n ${SOLINK} -+ ;; -+ --cflags) -+ echo -n ${CFLAGS} -+ # skip if asterisk includes are inside default include path -+ # (/usr/include/asterisk...) -+ if [ `dirname ${AST_INCDIR}` != "/usr/include" ]; then -+ echo -n " -I${AST_INCDIR}" -+ fi -+ ;; -+ --libs) -+ echo -n ${LIBS} -+ ;; -+ esac -+ shift -+done -+exit 0 -+ -+## -+# The End -+# diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch deleted file mode 100644 index 569db12f027b..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -uNr asterisk-1.0.5.orig/codecs/gsm/Makefile asterisk-1.0.5/codecs/gsm/Makefile ---- asterisk-1.0.5.orig/codecs/gsm/Makefile 2005-02-19 21:49:10.060313408 +0100 -+++ asterisk-1.0.5/codecs/gsm/Makefile 2005-02-19 21:49:46.176822864 +0100 -@@ -217,12 +217,16 @@ - ifneq ($(shell uname -m),ppc) - ifneq ($(shell uname -m),alpha) - ifneq ($(shell uname -m),sparc64) -+ifneq ($(shell uname -m),parisc) -+ifneq ($(shell uname -m),parisc64) - GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif - endif - endif - endif -+endif -+endif - - TOAST_SOURCES = $(SRC)/toast.c \ - $(SRC)/toast_lin.c \ -@@ -273,12 +277,16 @@ - ifneq ($(shell uname -m), ppc) - ifneq ($(shell uname -m), alpha) - ifneq ($(shell uname -m), sparc64) -+ifneq ($(shell uname -m), parisc) -+ifneq ($(shell uname -m), parisc64) - GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif - endif - endif - endif -+endif -+endif - - TOAST_OBJECTS = $(SRC)/toast.o \ - $(SRC)/toast_lin.o \ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff deleted file mode 100644 index 8b828e3fafed..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- asterisk-1.0.9/codecs/lpc10/Makefile.orig 2005-09-08 00:29:27.000000000 +0200 -+++ asterisk-1.0.9/codecs/lpc10/Makefile 2005-09-08 00:30:15.000000000 +0200 -@@ -22,30 +22,7 @@ - # - - WARNINGS = -Wall -Wno-comment -Wno-error --CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC --#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi) -- --#fix for PPC processors and ALPHA, And UltraSparc too --ifneq ($(OSARCH),Darwin) --ifneq ($(findstring BSD,${OSARCH}),BSD) --ifneq ($(PROC),ppc) --ifneq ($(PROC),x86_64) --ifneq ($(PROC),alpha) --#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. --#This works for even old (2.96) versions of gcc and provides a small boost either way. --#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it. --#So we go lowest common available by gcc and go a step down, still a step up from --#the default as we now have a better instruction set to work with. - Belgarath --ifeq ($(PROC),ultrasparc) -- CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer --else -- CFLAGS+= -march=$(PROC) --endif --endif --endif --endif --endif --endif -+CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC - - LIB = $(LIB_TARGET_DIR)/liblpc10.a - diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff deleted file mode 100644 index 7a9da8032690..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- asterisk-1.0.5/codecs/Makefile.orig 2005-02-10 09:59:42.303104992 +0100 -+++ asterisk-1.0.5/codecs/Makefile 2005-02-10 10:00:49.988815200 +0100 -@@ -19,18 +19,16 @@ - #MODG723=codec_g723_1.so codec_g723_1b.so - MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so") - MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so") --MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so") -+MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] && echo "codec_speex.so") - MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so") - CFLAGS+=-fPIC --CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include") --CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex") -+CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex") - - LIBG723=g723.1/libg723.a - LIBG723B=g723.1b/libg723b.a - LIBGSM=gsm/lib/libgsm.a - LIBGSMT=gsm/lib/libgsm.a - LIBLPC10=lpc10/liblpc10.a --LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib") - LIBSPEEX+=-lspeex -lm - LIBILBC=ilbc/libilbc.a - diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff deleted file mode 100644 index 98ae11aa180c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff +++ /dev/null @@ -1,64 +0,0 @@ ---- asterisk-1.0.7/asterisk.c.orig 2005-05-12 21:33:21.000000000 +0200 -+++ asterisk-1.0.7/asterisk.c 2005-05-12 21:38:33.000000000 +0200 -@@ -1581,7 +1581,9 @@ int main(int argc, char *argv[]) - int num; - char *buf; - char *runuser=NULL, *rungroup=NULL; -- struct pollfd silly_macos[1]; -+ struct pollfd silly_macos[1]; -+ gid_t runasgid = 0; -+ uid_t runasuid = 0; - - /* Remember original args for restart */ - if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) { -@@ -1701,17 +1703,9 @@ int main(int argc, char *argv[]) - ast_log(LOG_WARNING, "No such group '%s'!\n", rungroup); - exit(1); - } -- if (setgid(gr->gr_gid)) { -- ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup); -- exit(1); -- } -- if (option_verbose) -- ast_verbose("Running as group '%s'\n", rungroup); -+ runasgid = gr->gr_gid; - } - -- if (set_priority(option_highpriority)) { -- exit(1); -- } - if (runuser) { - struct passwd *pw; - pw = getpwnam(runuser); -@@ -1719,8 +1713,29 @@ int main(int argc, char *argv[]) - ast_log(LOG_WARNING, "No such user '%s'!\n", runuser); - exit(1); - } -- if (setuid(pw->pw_uid)) { -- ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser); -+ runasuid = pw->pw_uid; -+ } -+ -+ if (set_priority(option_highpriority)) { -+ exit(1); -+ } -+ -+ if (runasgid) { -+ if (setgid(runasgid)) { -+ ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", runasgid, rungroup); -+ exit(1); -+ } -+ if (option_verbose) -+ ast_verbose("Running as group '%s'\n", rungroup); -+ } -+ -+ if (runasuid) { -+ if(initgroups(runuser, runasgid) < 0) { -+ ast_log(LOG_WARNING, "Unable to set supplemental groups for %s\n", runuser); -+ exit(1); -+ } -+ if (setuid(runasuid)) { -+ ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", runasuid, runuser); - exit(1); - } - if (option_verbose) diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch deleted file mode 100644 index ebcf18b5b707..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch +++ /dev/null @@ -1,162 +0,0 @@ ---- asterisk-1.0.7/cli.c 2004-12-30 23:30:09.000000000 +0100 -+++ asterisk-1.0.8/cli.c 2005-06-10 22:52:27.000000000 +0200 -@@ -918,9 +918,14 @@ - return RESULT_SHOWUSAGE; - if (argc > 1) { - e = find_cli(argv + 1, 1); -- if (e) -- ast_cli(fd, e->usage); -- else { -+ if (e) { -+ if (e->usage) -+ ast_cli(fd, e->usage); -+ else { -+ join(fullcmd, sizeof(fullcmd), argv+1); -+ ast_cli(fd, "No help text available for '%s'.\n", fullcmd); -+ } -+ } else { - if (find_cli(argv + 1, -1)) { - return help_workhorse(fd, argv + 1); - } else { -@@ -934,72 +939,62 @@ - return RESULT_SUCCESS; - } - --static char *parse_args(char *s, int *max, char *argv[]) -+static char *parse_args(char *s, int *argc, char *argv[], int max) - { - char *dup, *cur; -- int x=0; -- int quoted=0; -- int escaped=0; -- int whitespace=1; -- -- dup = strdup(s); -- if (dup) { -- cur = dup; -- while(*s) { -- switch(*s) { -- case '"': -- /* If it's escaped, put a literal quote */ -- if (escaped) -- goto normal; -- else -- quoted = !quoted; -- if (quoted && whitespace) { -- /* If we're starting a quote, coming off white space start a new word, too */ -- argv[x++] = cur; -- whitespace=0; -- } -- escaped = 0; -- break; -- case ' ': -- case '\t': -- if (!quoted && !escaped) { -- /* If we're not quoted, mark this as whitespace, and -- end the previous argument */ -- whitespace = 1; -- *(cur++) = '\0'; -- } else -- /* Otherwise, just treat it as anything else */ -- goto normal; -- break; -- case '\\': -- /* If we're escaped, print a literal, otherwise enable escaping */ -- if (escaped) { -- goto normal; -- } else { -- escaped=1; -+ int x = 0; -+ int quoted = 0; -+ int escaped = 0; -+ int whitespace = 1; -+ -+ if (!(dup = strdup(s))) -+ return NULL; -+ -+ cur = dup; -+ while (*s) { -+ if ((*s == '"') && !escaped) { -+ quoted = !quoted; -+ if (quoted & whitespace) { -+ /* If we're starting a quoted string, coming off white space, start a new argument */ -+ if (x >= (max - 1)) { -+ ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -+ break; - } -- break; -- default: --normal: -- if (whitespace) { -- if (x >= AST_MAX_ARGS -1) { -- ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -- break; -- } -- /* Coming off of whitespace, start the next argument */ -- argv[x++] = cur; -- whitespace=0; -+ argv[x++] = cur; -+ whitespace = 0; -+ } -+ escaped = 0; -+ } else if (((*s == ' ') || (*s == '\t')) && !(quoted || escaped)) { -+ /* If we are not already in whitespace, and not in a quoted string or -+ processing an escape sequence, and just entered whitespace, then -+ finalize the previous argument and remember that we are in whitespace -+ */ -+ if (!whitespace) { -+ *(cur++) = '\0'; -+ whitespace = 1; -+ } -+ } else if ((*s == '\\') && !escaped) { -+ escaped = 1; -+ } else { -+ if (whitespace) { -+ /* If we are coming out of whitespace, start a new argument */ -+ if (x >= (max - 1)) { -+ ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -+ break; - } -- *(cur++) = *s; -- escaped=0; -+ argv[x++] = cur; -+ whitespace = 0; - } -- s++; -+ *(cur++) = *s; -+ escaped = 0; - } -- /* Null terminate */ -- *(cur++) = '\0'; -- argv[x] = NULL; -- *max = x; -+ s++; - } -+ /* Null terminate */ -+ *(cur++) = '\0'; -+ argv[x] = NULL; -+ *argc = x; -+ - return dup; - } - -@@ -1071,7 +1066,7 @@ - char matchstr[80]; - char *fullcmd = NULL; - -- if ((dup = parse_args(text, &x, argv))) { -+ if ((dup = parse_args(text, &x, argv, sizeof(argv) / sizeof(argv[0])))) { - join(matchstr, sizeof(matchstr), argv); - if (lock) - ast_mutex_lock(&clilock); -@@ -1142,8 +1137,8 @@ - struct ast_cli_entry *e; - int x; - char *dup; -- x = AST_MAX_ARGS; -- if ((dup = parse_args(s, &x, argv))) { -+ -+ if ((dup = parse_args(s, &x, argv, sizeof(argv) / sizeof(argv[0])))) { - /* We need at least one entry, or ignore */ - if (x > 0) { - ast_mutex_lock(&clilock); diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff deleted file mode 100644 index 3eb1e15bdb7c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- asterisk-1.0.7/contrib/scripts/addmailbox.orig 2005-05-11 23:17:10.000000000 +0200 -+++ asterisk-1.0.7/contrib/scripts/addmailbox 2005-05-11 23:21:57.000000000 +0200 -@@ -21,14 +21,14 @@ - echo - echo "New Voicemail context.." - echo "Creating Voicemail context directory..." -- mkdir -p ${VMHOME}/${context} -+ mkdir -m 750 -p ${VMHOME}/${context} - fi - - echo - echo "Creating Voicemail directory..." --mkdir -p ${VMHOME}/${context}/${mailbox} -+mkdir -m 750 -p ${VMHOME}/${context}/${mailbox} - echo "Creating INBOX..." --mkdir -p ${VMHOME}/${context}/${mailbox}/INBOX -+mkdir -m 750 -p ${VMHOME}/${context}/${mailbox}/INBOX - echo "Creating Default greetings..." - cat ${SNDHOME}/vm-theperson.gsm > ${VMHOME}/${context}/${mailbox}/unavail.gsm - cat ${SNDHOME}/vm-theperson.gsm > ${VMHOME}/${context}/${mailbox}/busy.gsm -@@ -41,5 +41,8 @@ - done - cat ${SNDHOME}/vm-isunavail.gsm >> ${VMHOME}/${context}/${mailbox}/unavail.gsm - cat ${SNDHOME}/vm-isonphone.gsm >> ${VMHOME}/${context}/${mailbox}/busy.gsm -+echo "Changing permissions..." -+chown -R asterisk:asterisk ${VMHOME}/${context} -+chmod u=rwX,g=rX,o= ${VMHOME}/${context}/${mailbox}/*.gsm - echo "Complete." - ---- asterisk-1.0.7/contrib/scripts/astgenkey.orig 2005-05-11 23:28:37.000000000 +0200 -+++ asterisk-1.0.7/contrib/scripts/astgenkey 2005-05-11 23:30:12.000000000 +0200 -@@ -55,7 +55,11 @@ - echo "Key creation successful." - echo "Public key: ${KEY}.pub" - echo "Private key: ${KEY}.key" -+ echo "Changing permissions..." - fi -+ chown root:asterisk ${KEY}.pub ${KEY}.key -+ chmod u=rw,g=r,o= ${KEY}.pub ${KEY}.key - else - echo "Unknown error creating keys." - fi -+ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch deleted file mode 100644 index a65c760507f1..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- asterisk-1.0.8/pbx/pbx_config.c.orig 2005-06-26 21:45:36.724546872 +0200 -+++ asterisk-1.0.8/pbx/pbx_config.c 2005-06-26 21:50:14.119376448 +0200 -@@ -1688,14 +1688,9 @@ - data = ""; - } - pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext)-1); -- cidmatch = strchr(ext, '/'); -- if (cidmatch) { -- *cidmatch = '\0'; -- cidmatch++; -- } -- stringp=ext; -- strsep(&stringp, "/"); -- -+ stringp = realext; -+ ext = strsep(&stringp, "/"); -+ cidmatch = stringp; - if (!data) - data=""; - while(*appl && (*appl < 33)) appl++; diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch deleted file mode 100644 index 624b50c5b474..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- asterisk-1.0.8/codecs/gsm/Makefile.orig 2005-06-25 09:30:45.146479088 +0200 -+++ asterisk-1.0.8/codecs/gsm/Makefile 2005-06-25 09:32:05.008338240 +0200 -@@ -46,6 +46,8 @@ - ifneq (${PROC},sparc64) - ifneq (${PROC},ppc) - ifneq (${PROC},ppc64) -+ifneq ($(PROC),parisc) -+ifneq ($(PROC),parisc64) - OPTIMIZE+=-march=$(PROC) - endif - endif -@@ -56,6 +58,8 @@ - endif - endif - endif -+endif -+endif - - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. -@@ -224,6 +228,8 @@ - ifneq ($(shell uname -m),alpha) - ifneq ($(shell uname -m),armv4l) - ifneq ($(shell uname -m),sparc64) -+ifneq ($(shell uname -m),parisc) -+ifneq ($(shell uname -m),parisc64) - GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif -@@ -231,6 +237,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_SOURCES = $(SRC)/toast.c \ - $(SRC)/toast_lin.c \ -@@ -282,6 +290,8 @@ - ifneq ($(shell uname -m), alpha) - ifneq ($(shell uname -m), armv4l) - ifneq ($(shell uname -m), sparc64) -+ifneq ($(shell uname -m), parisc) -+ifneq ($(shell uname -m), parisc64) - GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif -@@ -289,6 +299,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_OBJECTS = $(SRC)/toast.o \ - $(SRC)/toast_lin.o \ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff deleted file mode 100644 index c1350ace33d1..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- asterisk-1.0.8/asterisk.c.orig 2005-05-16 05:04:58.000000000 +0200 -+++ asterisk-1.0.8/asterisk.c 2005-06-25 09:45:18.763669088 +0200 -@@ -1581,7 +1581,9 @@ - int num; - char *buf; - char *runuser=NULL, *rungroup=NULL; -- struct pollfd silly_macos[1]; -+ struct pollfd silly_macos[1]; -+ gid_t runasgid = 0; -+ uid_t runasuid = 0; - - /* Remember original args for restart */ - if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) { -@@ -1709,12 +1711,7 @@ - ast_log(LOG_WARNING, "No such group '%s'!\n", rungroup); - exit(1); - } -- if (setgid(gr->gr_gid)) { -- ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup); -- exit(1); -- } -- if (option_verbose) -- ast_verbose("Running as group '%s'\n", rungroup); -+ runasgid = gr->gr_gid; - } - - if (runuser) { -@@ -1724,8 +1721,25 @@ - ast_log(LOG_WARNING, "No such user '%s'!\n", runuser); - exit(1); - } -- if (setuid(pw->pw_uid)) { -- ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser); -+ runasuid = pw->pw_uid; -+ } -+ -+ if (runasgid) { -+ if (setgid(runasgid)) { -+ ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", runasgid, rungroup); -+ exit(1); -+ } -+ if (option_verbose) -+ ast_verbose("Running as group '%s'\n", rungroup); -+ } -+ -+ if (runasuid) { -+ if(initgroups(runuser, runasgid) < 0) { -+ ast_log(LOG_WARNING, "Unable to set supplemental groups for %s\n", runuser); -+ exit(1); -+ } -+ if (setuid(runasuid)) { -+ ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", runasuid, runuser); - exit(1); - } - if (option_verbose) diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff deleted file mode 100644 index 424421d7751d..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.0.8/utils.c.orig 2005-09-13 20:14:28.000000000 +0000 -+++ asterisk-1.0.8/utils.c 2005-09-13 20:14:52.000000000 +0000 -@@ -399,7 +399,7 @@ - offset = strstr(upper(haystack, u1, u1len), upper(needle, u2, u2len)); - if (offset) { - /* Return the offset into the original string */ -- return ((char *)((unsigned int)haystack + (unsigned int)(offset - u1))); -+ return ((char *)((unsigned long)haystack + (unsigned long)(offset - u1))); - } else { - return NULL; - } diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff deleted file mode 100644 index 811067dda3c5..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- asterisk-1.0.9/cdr/cdr_tds.c.orig 2005-10-29 00:50:28.000000000 +0000 -+++ asterisk-1.0.9/cdr/cdr_tds.c 2005-10-29 00:50:57.000000000 +0000 -@@ -412,7 +412,7 @@ - - static int mssql_connect(void) - { -- TDSCONNECTINFO *connection = NULL; -+ TDSCONNECTION *connection = NULL; - char query[128]; - - /* Connect to M$SQL Server */ ---- asterisk-1.0.9/cdr/cdr_tds.c.orig 2005-10-29 04:54:16.000000000 +0000 -+++ asterisk-1.0.9/cdr/cdr_tds.c 2005-10-29 04:54:36.000000000 +0000 -@@ -457,11 +457,11 @@ - { - ast_log(LOG_ERROR, "Failed to connect to MSSQL server.\n"); - tds = NULL; /* freed by tds_connect() on error */ -- tds_free_connect(connection); -+ tds_free_connection(connection); - connection = NULL; - goto connect_fail; - } -- tds_free_connect(connection); -+ tds_free_connection(connection); - connection = NULL; - - sprintf(query, "USE %s", dbname); diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch deleted file mode 100644 index de86f2a903f7..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch +++ /dev/null @@ -1,168 +0,0 @@ -? asterisk_ukcid.diff -Index: channels/chan_zap.c -=================================================================== -RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v -retrieving revision 1.344.2.7 -diff -u -r1.344.2.7 chan_zap.c ---- channels/chan_zap.c 27 Oct 2004 14:41:55 -0000 1.344.2.7 -+++ channels/chan_zap.c 4 Nov 2004 21:05:03 -0000 -@@ -790,6 +790,14 @@ - return 0; - } - -+static int zt_get_history(int fd, void *buf, int buf_size) -+{ -+ struct zt_history hist; -+ hist.buf=buf; -+ hist.len=buf_size; -+ return ioctl(fd, ZT_GET_HISTORY, &hist); -+} -+ - static int alloc_sub(struct zt_pvt *p, int x) - { - ZT_BUFFERINFO bi; -@@ -5114,6 +5122,120 @@ - } - } - #endif -+ /* If we're using an X100P in the UK, caller ID needs to be extracted from -+ * the history buffer */ -+ if (p->use_callerid && p->cid_start == CID_START_USEHIST) { -+ ast_log(LOG_DEBUG,"Using history buffer to extract UK caller ID\n"); -+ cs = callerid_new(cid_signalling); -+ if (cs) { -+ unsigned char cidbuf[16384]; -+ res=0; -+ -+ res = zt_get_history(p->subs[index].zfd,cidbuf,sizeof(cidbuf)); -+ if(res<0) { -+ ast_log(LOG_ERROR,"zt_get_history failed: %s\n", strerror(errno)); -+ } else { -+ res=callerid_feed(cs,cidbuf,sizeof(cidbuf),AST_LAW(p)); -+ if (res < 0) { -+ ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno)); -+ } -+ } -+ -+ if(res==1) { -+ callerid_get(cs, &name, &number, &flags); -+ if (option_debug) -+ ast_log(LOG_DEBUG, "CallerID number: %s, name: %s, flags=%d\n", number, name, flags); -+ } -+ } -+ if (p->usedistinctiveringdetection == 1) { -+#if 1 -+ bump_gains(p); -+#endif -+ len = 0; -+ distMatches = 0; -+ /* Clear the current ring data array so we dont have old data in it. */ -+ for (receivedRingT=0; receivedRingT < 3; receivedRingT++) { -+ curRingData[receivedRingT] = 0; -+ } -+ receivedRingT = 0; -+ counter = 0; -+ counter1 = 0; -+ /* Check to see if context is what it should be, if not set to be. */ -+ if (strcmp(p->context,p->defcontext) != 0) { -+ strncpy(p->context, p->defcontext, sizeof(p->context)-1); -+ strncpy(chan->context,p->defcontext,sizeof(chan->context)-1); -+ } -+ -+ for(;;) { -+ i = ZT_IOMUX_READ | ZT_IOMUX_SIGEVENT; -+ if ((res = ioctl(p->subs[index].zfd, ZT_IOMUX, &i))) { -+ ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno)); -+ callerid_free(cs); -+ ast_hangup(chan); -+ return NULL; -+ } -+ if (i & ZT_IOMUX_SIGEVENT) { -+ res = zt_get_event(p->subs[index].zfd); -+ ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); -+ res = 0; -+ /* Let us detect distinctive ring */ -+ -+ curRingData[receivedRingT] = p->ringt; -+ -+ if (p->ringt < RINGT/2) -+ break; -+ ++receivedRingT; /* Increment the ringT counter so we can match it against -+ values in zapata.conf for distinctive ring */ -+ } else if (i & ZT_IOMUX_READ) { -+ res = read(p->subs[index].zfd, buf, sizeof(buf)); -+ if (res < 0) { -+ if (errno != ELAST) { -+ ast_log(LOG_WARNING, "read returned error: %s\n", strerror(errno)); -+ callerid_free(cs); -+ ast_hangup(chan); -+ return NULL; -+ } -+ break; -+ } -+ if (p->ringt) -+ p->ringt--; -+ if (p->ringt == 1) { -+ res = -1; -+ break; -+ } -+ } -+ } -+ if(option_verbose > 2) -+ /* this only shows up if you have n of the dring patterns filled in */ -+ ast_verbose( VERBOSE_PREFIX_3 "Detected ring pattern: %d,%d,%d\n",curRingData[0],curRingData[1],curRingData[2]); -+ -+ for (counter=0; counter < 3; counter++) { -+ /* Check to see if the rings we received match any of the ones in zapata.conf for this -+ channel */ -+ distMatches = 0; -+ for (counter1=0; counter1 < 3; counter1++) { -+ if (curRingData[counter1] <= (p->drings.ringnum[counter].ring[counter1]+10) && curRingData[counter1] >= -+ (p->drings.ringnum[counter].ring[counter1]-10)) { -+ distMatches++; -+ } -+ } -+ if (distMatches == 3) { -+ /* The ring matches, set the context to whatever is for distinctive ring.. */ -+ strncpy(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context)-1); -+ strncpy(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context)-1); -+ if(option_verbose > 2) -+ ast_verbose( VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n",p->context); -+ break; -+ } -+ } -+ } -+ /* Restore linear mode (if appropriate) for Caller*ID processing */ -+ zt_setlinear(p->subs[index].zfd, p->subs[index].linear); -+#if 1 -+ restore_gains(p); -+#endif -+ } -+ - /* If we want caller id, we're in a prering state due to a polarity reversal - * and we're set to use a polarity reversal to trigger the start of caller id, - * grab the caller id and wait for ringing to start... */ -@@ -9178,6 +9300,8 @@ - cid_start = CID_START_RING; - else if (!strcasecmp(v->value, "polarity")) - cid_start = CID_START_POLARITY; -+ else if (!strcasecmp(v->value, "usehist")) -+ cid_start = CID_START_USEHIST; - else if (ast_true(v->value)) - cid_start = CID_START_RING; - } else if (!strcasecmp(v->name, "threewaycalling")) { -Index: include/asterisk/callerid.h -=================================================================== -RCS file: /usr/cvsroot/asterisk/include/asterisk/callerid.h,v -retrieving revision 1.7 -diff -u -r1.7 callerid.h ---- include/asterisk/callerid.h 19 Sep 2004 16:17:18 -0000 1.7 -+++ include/asterisk/callerid.h 4 Nov 2004 21:05:04 -0000 -@@ -30,6 +30,7 @@ - - #define CID_START_RING 1 - #define CID_START_POLARITY 2 -+#define CID_START_USEHIST 3 - - - #define AST_LIN2X(a) ((codec == AST_FORMAT_ALAW) ? (AST_LIN2A(a)) : (AST_LIN2MU(a))) diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-vmail.cgi.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-vmail.cgi.patch deleted file mode 100644 index 7c6cb09a9d46..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-vmail.cgi.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- asterisk/contrib/scripts/vmail.cgi 2005/07/07 23:34:59 1.15 -+++ asterisk/contrib/scripts/vmail.cgi 2005/10/30 16:30:35 1.16 -@@ -545,14 +545,16 @@ _EOH - sub message_audio() - { - my ($forcedownload) = @_; -- my $folder = param('folder'); -- my $msgid = param('msgid'); -- my $mailbox = param('mailbox'); -- my $context = param('context'); -+ my $folder = &untaint(param('folder')); -+ my $msgid = &untaint(param('msgid')); -+ my $mailbox = &untaint(param('mailbox')); -+ my $context = &untaint(param('context')); - my $format = param('format'); - if (!$format) { - $format = &getcookie('format'); - } -+ &untaint($format); -+ - my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format"; - - $msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!"); 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 deleted file mode 100644 index dfb46cc73908..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff +++ /dev/null @@ -1,229 +0,0 @@ -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 diff --git a/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff b/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff deleted file mode 100644 index b66b5421ade8..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- work/asterisk-1.0.0/dns.c2004-06-22 20:11:15.000000000 +0000 -+++ dns.c2004-10-06 12:59:38.000000000 +0000 -@@ -150,15 +150,18 @@ - } - return 0; - } -- -+/* - #if defined(res_ninit) - #define HAS_RES_NINIT - #else -+*/ - AST_MUTEX_DEFINE_STATIC(res_lock); -+/* - #if 0 - #warning Warning, res_ninit is missing... Could have reentrancy issues - #endif - #endif -+*/ - - int ast_search_dns(void *context, - const char *dname, int class, int type, diff --git a/net-misc/asterisk/files/1.0.0/asterisk.confd b/net-misc/asterisk/files/1.0.0/asterisk.confd deleted file mode 100644 index c025d64f3f0c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.confd +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.confd,v 1.1 2004/09/24 00:01:57 stkn Exp $ - -# -# see "asterisk -h" for a list of options -# - -OPTIONS="" diff --git a/net-misc/asterisk/files/1.0.0/asterisk.confd.sec b/net-misc/asterisk/files/1.0.0/asterisk.confd.sec deleted file mode 100644 index 63be8c0ac851..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.confd.sec +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.confd.sec,v 1.4 2005/05/31 23:19:56 stkn Exp $ - -# -# see "asterisk -h" for a list of options -# -ASTERISK_OPTS="" - -# -# User to run asterisk as -# -# Examples: -# "user:group" -# "user" -# "" or unset = root:root -# -ASTERISK_USER="asterisk:asterisk" - -# -# Nicelevel -# -# Set the priority of the asterisk process -# -# Range: -19..20 -#ASTERISK_NICE="" diff --git a/net-misc/asterisk/files/1.0.0/asterisk.rc6 b/net-misc/asterisk/files/1.0.0/asterisk.rc6 deleted file mode 100644 index ac3ddfae6cb5..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.rc6 +++ /dev/null @@ -1,21 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.rc6,v 1.2 2005/03/22 15:51:16 stkn Exp $ - -depend() { - need net logger - after zaptel -} - -start() { - ebegin "Starting asterisk PBX" - start-stop-daemon --start --exec /usr/sbin/asterisk -- ${OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk.pid - eend $? -} diff --git a/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec b/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec deleted file mode 100644 index 5e29792351ff..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec +++ /dev/null @@ -1,46 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec,v 1.5 2005/12/20 21:11:53 stkn Exp $ - -depend() { - need net - use zaptel mysql postgresql capi -} - -start() { - local OPTS USER GROUP - - if [[ -n "${ASTERISK_NICE}" ]]; then - if [[ ${ASTERISK_NICE} -ge -20 ]] && \ - [[ ${ASTERISK_NICE} -le 19 ]]; then - OPTS="--nicelevel ${ASTERISK_NICE}" - else - eerror "Nice value must be between -20 and 19" - fi - fi - - if [[ -n "${ASTERISK_USER}" ]]; then - USER=${ASTERISK_USER/:*/} - GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }') - if [[ -n "${USER}" ]]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}" - fi - if [[ -n "${GROUP}" ]]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}" - GROUP=":${GROUP}" # make it look nice... - fi - ebegin "Starting asterisk PBX (as ${USER}${GROUP})" - else - ebegin "Starting asterisk PBX (as root)" - fi - start-stop-daemon --start --exec /usr/sbin/asterisk \ - ${OPTS} -- ${ASTERISK_OPTS} - eend $? -} - -stop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid - eend $? -} diff --git a/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff b/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff deleted file mode 100644 index 5001809d2b7f..000000000000 --- a/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- asterisk-addons-1.0.7/res_perl/AstAPIBase.c.orig 2005-03-28 21:38:28.998238136 +0200 -+++ asterisk-addons-1.0.7/res_perl/AstAPIBase.c 2005-03-28 21:40:41.375113792 +0200 -@@ -704,7 +704,7 @@ - struct ast_channel *asterisk_request_and_dial(char *type,char *data,int format,char *callerid, int timeout) { - int reason; - struct ast_channel *chan; -- chan = ast_request_and_dial(type,AST_FORMAT_ULAW, data, timeout, &reason,callerid); -+ chan = ast_request_and_dial(type,AST_FORMAT_ULAW, data, timeout, &reason, 0, callerid, NULL); - return chan; - } - -@@ -743,7 +743,7 @@ - - struct ast_channel *asterisk_request(int format,char *type,char *data,char *callerid) { - struct ast_channel *chan=NULL; -- chan = ast_request(type, format, data); -+ chan = ast_request(type, format, data, NULL); - if (callerid && strlen(callerid)) - ast_set_callerid(chan, callerid, 1); - |