aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.c
AgeCommit message (Collapse)AuthorFilesLines
2008-06-02Merged revisions 119744 via svnmerge from russell1-9/+50
https://origsvn.digium.com/svn/asterisk/trunk ................ r119744 | russell | 2008-06-02 09:41:55 -0500 (Mon, 02 Jun 2008) | 13 lines Merged revisions 119742 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119742 | russell | 2008-06-02 09:39:45 -0500 (Mon, 02 Jun 2008) | 5 lines Improve CLI command blacklist checking for the command manager action. Previously, it did not handle case or whitespace properly. This made it possible for blacklisted commands to get executed anyway. (closes issue #12765) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@119745 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Merged revisions 118161 via svnmerge from bbryant1-3/+18
https://origsvn.digium.com/svn/asterisk/trunk ........ r118161 | bbryant | 2008-05-23 16:19:42 -0500 (Fri, 23 May 2008) | 3 lines Add new functionality to http server that requires manager authentication for any path that includes a directory named 'private'. This patch also requires manager authentication for any POST's being sent to the server as well to help secure uploads. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@118168 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-23Merged revisions 114592 via svnmerge from russell1-7/+7
https://origsvn.digium.com/svn/asterisk/trunk ................ r114592 | russell | 2008-04-23 13:01:00 -0500 (Wed, 23 Apr 2008) | 13 lines Merged revisions 114591 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114591 | russell | 2008-04-23 12:55:31 -0500 (Wed, 23 Apr 2008) | 5 lines Store the manager session ID explicitly as 4 byte ID instead of a ulong. The mansession_id cookie is coded to be limited to 8 characters of hex, and this could break logins from 64-bit machines in some cases. (inspired by AST-20) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114593 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-22Merged revisions 114527 via svnmerge from russell1-9/+13
https://origsvn.digium.com/svn/asterisk/trunk ........ r114527 | russell | 2008-04-22 10:46:01 -0500 (Tue, 22 Apr 2008) | 8 lines Correct action_ping() and action_events() with regards to Manager 1.1 documentation. Also, fix a bug in xml_translate(). (closes issue #11649) Reported by: ys Patches: trunk_manager.c.diff uploaded by ys (license 281) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114528 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-18Merged revisions 114285 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r114285 | russell | 2008-04-18 16:51:05 -0500 (Fri, 18 Apr 2008) | 10 lines Merged revisions 114284 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114284 | russell | 2008-04-18 16:48:06 -0500 (Fri, 18 Apr 2008) | 2 lines Don't destroy a manager session if poll() returns an error of EAGAIN. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114286 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-10Merged revisions 114052 via svnmerge from mmichelson1-0/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r114052 | mmichelson | 2008-04-10 17:02:32 -0500 (Thu, 10 Apr 2008) | 11 lines Merged revisions 114051 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines Fix 1.4 build when LOW_MEMORY is enabled. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114056 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-02Merged revisions 112469 via svnmerge from mmichelson1-0/+13
https://origsvn.digium.com/svn/asterisk/trunk ................ r112469 | mmichelson | 2008-04-02 12:36:49 -0500 (Wed, 02 Apr 2008) | 21 lines Merged revisions 112468 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112468 | mmichelson | 2008-04-02 12:36:04 -0500 (Wed, 02 Apr 2008) | 13 lines Fix a race condition in the manager. It is possible that a new manager event could be appended during a brief time when the manager is not waiting for input. If an event comes during this period, we need to set an indicator that there is an event pending so that the manager doesn't attempt to wait forever for an event that already happened. (closes issue #12354) Reported by: bamby Patches: manager_race_condition.diff uploaded by bamby (license 430) (comments added by me) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@112470 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Merged revisions 110831 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r110831 | mmichelson | 2008-03-25 19:02:31 -0500 (Tue, 25 Mar 2008) | 6 lines This ensures that the manager interface is not enabled by default. Prior to this change, it was possible to start Asterisk with the manager interface enabled, then either comment out the enabled option or make manager.conf unopenable and the manager interface would still be enabled. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@110832 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109447 via svnmerge from russell1-9/+9
https://origsvn.digium.com/svn/asterisk/trunk ........ r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109396 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r109396 | file | 2008-03-18 12:13:07 -0300 (Tue, 18 Mar 2008) | 3 lines Make sure values are interpreted as character strings and not format strings. (AST-2008-004) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109398 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-13Merged revisions 108586 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r108586 | mmichelson | 2008-03-13 16:47:55 -0500 (Thu, 13 Mar 2008) | 3 lines Make this compile ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108587 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-13Merged revisions 108529 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r108529 | mmichelson | 2008-03-13 15:59:00 -0500 (Thu, 13 Mar 2008) | 11 lines Fixing a potential buffer overflow in the manager command ModuleCheck. Though this overflow is exploitable remotely, we are NOT issuing a security advisory for this since in order to exploit the overflow, the attacker would have to establish an authenticated manager session AND have the system privilege. By gaining this privilege, the attacker already has more powerful weapons at his disposal than overflowing a buffer with a malformed manager header, so the vulnerability in this case really lies with the authentication method that allowed the attacker to gain the system privilege in the first place. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108582 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Merged revisions 108295 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r108295 | russell | 2008-03-12 17:13:18 -0500 (Wed, 12 Mar 2008) | 3 lines Rename ast_tcptls_server_instance to session_instance, since this pertains to server and client usage. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108348 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105864 via svnmerge from russell1-6/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r105864 | mmichelson | 2008-03-04 17:24:56 -0600 (Tue, 04 Mar 2008) | 5 lines There are several places in manager.c where BUFSIZ is used for a buffer which will contain nowhere near that amount of data. This makes these buffers more reasonably sized. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106308 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105840 via svnmerge from russell1-4/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r105840 | tilghman | 2008-03-04 17:04:29 -0600 (Tue, 04 Mar 2008) | 2 lines Whitespace changes only ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106306 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105804 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r105804 | russell | 2008-03-04 16:28:03 -0600 (Tue, 04 Mar 2008) | 2 lines add a destroy API call for a server instance ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106305 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105785 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r105785 | russell | 2008-03-04 16:23:21 -0600 (Tue, 04 Mar 2008) | 2 lines More public API name changes to use an appropriate ast_ prefix ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106304 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105773 via svnmerge from russell1-4/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r105773 | russell | 2008-03-04 16:15:18 -0600 (Tue, 04 Mar 2008) | 2 lines Rename public object server_instance to ast_tcptls_server_instance ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106303 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Merged revisions 104704 via svnmerge from tilghman1-1/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r104704 | tilghman | 2008-02-27 12:15:10 -0600 (Wed, 27 Feb 2008) | 2 lines Ensure the session ID can't be 0. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104705 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Rename version.h to ast_version.h. Next, I will be re-adding version.h as anrussell1-1/+1
automatically generated file like it used to be. This still needs to be there for modules that have to check it to compile against multiple asterisk versions. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104244 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-22Move Originate to a separate privilege and require the additional System ↵tilghman1-2/+18
privilege to call out to a subshell. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104039 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-21Merged revisions 104015 via svnmerge from kpfleming1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104016 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Even more sane permissions. This should be handled via a umask, like in ↵qwell1-1/+1
many other places. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103474 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Use slight more sane permissionsqwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Fix build on *BSD. These permissions constants are not available there.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103387 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Requested changes from Pari, reviewed by Russell.jpeeler1-52/+209
Added ability to retrieve list of categories in a config file. Added ability to retrieve the content of a particular category. Added ability to empty a context. Created new action to create a new file. Updated delete action to allow deletion by line number with respect to category. Added new action insert to add new variable to category at specified line. Updated action newcat to allow new category to be inserted in file above another existing category. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103331 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-11Just some minor coding style cleanup...file1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103318 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-03CoreSettings and CoreStatus are missing the terminating "\r\n". Also, sometilghman1-44/+52
miscellaneous spacing and initialization issues. (closes issue #11909) Reported by: srt Patches: patch-11909-2.diff uploaded by srt (license 378) Tested by: srt git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102190 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Merge changes from team/group/sip-tcptlsrussell1-1/+2
This set of changes introduces TCP and TLS support for chan_sip. There are various new options in configs/sip.conf.sample that are used to enable these features. Also, there is a document, doc/siptls.txt that describes some things in more detail. This code was implemented by Brett Bryant and James Golovich. It was reviewed by Joshua Colp and myself. A number of other people participated in the testing of this code, but since it was done outside of the bug tracker, I do not have their names. If you were one of them, thanks a lot for the help! (closes issue #4903, but with completely different code that what exists there.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99085 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14Make sure the user's manager secret exists, even if it is blank.file1-1/+1
(closes issue #11749) Reported by: srt git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98830 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-12Conversion to load manager.conf into memory did not convert the passwordtilghman1-3/+2
functions correctly. (Closes issue #11749) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98536 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10oops, missed the case of a 0 permission (which should mean everybody is ↵tilghman1-2/+2
allowed, not nobody) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97655 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Several manager changes:tilghman1-15/+16
1) Add the Dialplan class, for NewExten and VarSet events, which should cut down on the volume of traffic in the Call class. 2) Permit some commands to be run from multiple classes, such as allowing DBGet to be run from either the System or the Reporting class. 3) Heavily document each class in the sample config, as there were several that made no sense to be in the write= line, and two that made no sense to be in the read= line (since they controlled no permissions there). (Closes issue #10386) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97651 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-07Move ModuleLoad and ModuleCheck manager commands from loader.c to manager.c. ↵file1-0/+98
Previously they would get registered twice because of the way manager.c operates. (closes issue #11699) Reported by: caio1982 Patches: manager_module_commands1.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96858 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05Now that the version.h file was getting properly regenerated every time the svnrussell1-1/+1
revision changed, every module that used the version was getting rebuilt after every svn update. This severly annoyed me pretty quickly, so I have improved the situation. Now, instead of generating version.h, main/version.c is generated. version.c includes the version information, as well as a couple of API calls for modules to retrieve the version. So now, only version.c will get rebuilt, and the main asterisk binary relinked, which is must faster than rebuilding http.c, manager.c, asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ... The only minor change in behavior here is that the version information reported by chan_sip, for example, is the version of the Asterisk core, and not necessarily the Asterisk version that the chan_sip module came from. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27Merged revisions 94824 via svnmerge from kpfleming1-5/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94824 | kpfleming | 2007-12-26 18:01:47 -0700 (Wed, 26 Dec 2007) | 2 lines make this comment explain the situation in an even more explicit fashion ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94825 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26Merged revisions 94808 via svnmerge from tilghman1-0/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94808 | tilghman | 2007-12-26 14:43:38 -0600 (Wed, 26 Dec 2007) | 6 lines Workaround for what is probably a glibc bug (but we'll see this crop up again and again, if we don't add the workaround). Reported by: rolek Patch by: tilghman (Closes issue #11601, closes issue #11426) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94809 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-16Adding a new CLI command for "manager reload", which is important now thatoej1-0/+21
you need to reload after changes. Thanks YS. Reported by: ys Patches: trunk93163_manager_reload.c.diff uploaded by ys (license 281) (related to issue #11414) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-16Change manager so that registered accounts are stored in memory. This opens ↵oej1-162/+143
for a manager realtime implementation. If you change accounts in manager.conf, you now need to reload to activate the changes (deletions, additions). This was not the case with 1.4. Reported by: ys Patches: trunk93163_manager_reload.c.diff uploaded by ys (license 281) (closes issue #11414) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93165 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.mmichelson1-1/+1
Thanks to kpfleming for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.mmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵mmichelson1-1/+1
option_verbose is not equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this check. I did a quick look in the source and used this macro in some places where option_verbose was used. I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06- The Ping Actionoej1-11/+21
- Now use Response: success - New header "Ping: pong" :-) - The Events action - Now use Response: Success - The new status is reported as "Events: On" or "Events: Off" - Report if manager is enabled in the reload event Small cleanups... From moremanager git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91420 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Change description of new manager commandoej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Add manager command for showing all current channels.oej1-0/+67
Thanks, eliel, for writing the original patch. Modified by me to follow other manager events and the new "moremanager" style. (closes issue #11478) Reported by: eliel Patches: manager.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91347 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Change cdr_manager to use a "CDR" level, rather than the (overcrowded) ↵tilghman1-0/+1
"call" level. (Closes issue #11015) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Merged revisions 90348 via svnmerge from russell1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines Change the behavior of ao2_link(). Previously, in inherited a reference. Now, it automatically increases the reference count to reflect the reference that is now held by the container. This was done to be more consistent with ao2_unlink(), which automatically releases the reference held by the container. It also makes it so it is no longer possible for a pointer to be invalid after ao2_link() returns. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90351 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29restore behavior from the 1.4 branch... manager users created via users.conf ↵kpfleming1-0/+4
should default to *all* permissions, not none git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90149 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Merged revisions 90098 via svnmerge from kpfleming1-2/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90098 | kpfleming | 2007-11-28 16:30:46 -0600 (Wed, 28 Nov 2007) | 2 lines it is impossible to set permissions for manager accounts created by users.conf (reported internally, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90100 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23Merged revisions 89536 via svnmerge from tilghman1-25/+69
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89536 | tilghman | 2007-11-23 11:18:26 -0600 (Fri, 23 Nov 2007) | 10 lines Up until this point, the XML output of the manager has been technically invalid, due to the repetition of certain parameters in a single event. This caused various issues for XML parsers, some of which refused to parse at all, given the invalidity of the rendered XML. So this commit fixes the XML output, ensuring that each entity parameter has a unique name, thus ensuring valid XML. Reported by: msetim Patch by: tilghman (Closes issue #10220) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89537 f38db490-d61c-443f-a65b-d21fe96a405b