1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-16 06:15:24 +00:00
Commit Graph

1653 Commits

Author SHA1 Message Date
Philipp Schafft
a5f7b621c0 Feature: Work around and warn user if no PRNG seeds are configured 2021-07-26 15:05:04 +00:00
Philipp Schafft
f688dce8a5 Feature: Added support for PRNG_SEED_TYPE_STATIC, and PRNG_SEED_TYPE_PROFILE 2021-07-26 15:05:04 +00:00
Philipp Schafft
6091b6b278 Update: Use timing_get_time() not time() for seeding, it adds about 10 bits 2021-07-26 15:05:04 +00:00
Philipp Schafft
8d80ef6a8b Feature: Crossseed with OpenSSL if we have OpenSSL 2021-07-26 15:05:04 +00:00
Philipp Schafft
43155d7273 Feature: Abuse _slave_thread() to run prng_auto_reseed() in the breaks 2021-07-26 15:05:04 +00:00
Philipp Schafft
bf5a25ff45 Feature: Added API for auto-reseeding 2021-07-26 15:05:04 +00:00
Philipp Schafft
6d91c12acf Fix: Migrated from fopen/fread/fclose to open/read/close for reading files
stdio may buffer the input and may read to far ahead. This is not a good
idea with high quality PRNG devices as it may take significant time to
do so, and remove entropy that will just be discarded.
2021-07-26 15:05:04 +00:00
Philipp Schafft
8c567e5005 Update: Also seed with the length of our seed 2021-07-26 15:05:04 +00:00
Philipp Schafft
1654cadab3 Feature: Added support for providing PRNG seeds via config 2021-07-26 15:05:04 +00:00
Philipp Schafft
a30b15df90 Fix: Fixed bugs in prng.c 2021-07-26 15:05:04 +00:00
Philipp Schafft
5176c7232b Update: Improved type casts a bit 2021-07-26 15:05:04 +00:00
Philipp Schafft
70419a33b5 Feature: Added PRNG 2021-07-26 15:05:04 +00:00
Philipp Schafft
2b9edf6fd1 Feature: Added support to copy a digest 2021-07-26 15:05:04 +00:00
Philipp Schafft
fa95e94c65 Fix: Corrected a memory corruption 2021-07-26 15:05:04 +00:00
Philipp Schafft
29c5bd8d85 Feature: Added digest_algo_id2str() and digest_algo_length_bytes() 2021-07-26 15:05:04 +00:00
Philipp Schafft
9560620c02 Feature: Added SHA3 support 2021-07-26 15:05:04 +00:00
Philipp Schafft
bbddb556ef Feature: Added abstract refobject for digest calculation 2021-07-26 15:05:04 +00:00
Philipp Schafft
355d7e976b Feature: Allow client altering on auth fail and acl deny
This adds the following tags to the config file below <role>:
* <on-failed-action>:   Action to take on auth fail
* <on-failed-argument>: Argument for action on auth fail
* <on-deny-action>:     Action to take on acl deny
* <on-deny-argument>:   Argument for action on acl deny

All client alter actions are supported. The corresponding
auth does not need to have the permission for those operations.

Notes:
    Likely <on-deny-*> should be moved below <acl>, See: #2351

Closes: #1272
2020-10-18 16:10:26 +00:00
Philipp Schafft
d245b0261b Feature: Support <http-headers> in <listen-socket>
Closes: #2359
2020-10-15 20:41:21 +00:00
Philipp Schafft
1c98b77aab Fix: Corrected status code for ICECAST_ERROR_ADMIN_MOUNT_NOT_ACCEPT_URL_UPDATES
Closes: #2373
2020-10-15 16:19:38 +00:00
Philipp Schafft
c3340dd73d Fix: Handle safe HTTP methods in unsafe context correctly
Closes: #2398
2020-10-15 15:23:52 +00:00
Philipp Schafft
e43fd645c1 Feature: Support names for ACLs
Closes: #2347
2020-10-15 14:20:09 +00:00
Philipp Schafft
726bef6d81 Fix: Corrected formating 2020-10-15 13:54:40 +00:00
Philipp Schafft
5f3efe5d52 Fix: Corrected error code for mounts with max listeners reached
Closes: #738
2020-10-15 13:50:10 +00:00
Philipp Schafft
8fac31520c Cleanup: Removed unused var unique_tag 2020-10-15 10:46:46 +00:00
Philipp Schafft
2e377a3e31 Feature: Handle gracefully when a logfile is not configured 2020-10-15 08:57:20 +00:00
Philipp Schafft
1c6d6ae67b Feature: Support loading maintainance entries for dashboard from database 2020-10-14 10:50:03 +00:00
Philipp Schafft
2af9830c92 Feature: Added reportxml_database_build_fragment() 2020-10-14 10:45:00 +00:00
Philipp Schafft
0fb71d4b98 Update: Corrected dashboard generation, but still needs some more updates 2020-10-13 06:07:28 +00:00
Philipp Schafft
ff34cd0522 Cleanup: Replaced html_success()'s own data sending with client_send_buffer() 2020-10-12 19:55:55 +00:00
Philipp Schafft
55b6378023 Cleanup: Unified code sending responses to client some 2020-10-12 18:23:11 +00:00
Philipp Schafft
33c9d81cb6 Fix: Do not use wildcard addresses for hostname generation
See: #2365
2020-10-11 15:53:51 +00:00
Philipp Schafft
88e2cdd465 Feature: Added a stats.xml entry <display-title> to replace <title>, and <artist> 2020-10-11 15:30:18 +00:00
Philipp Schafft
ea6dd6954a Feature: Added new admin command publicstats with a public view of the stats 2020-10-11 14:50:30 +00:00
Philipp Schafft
7a3eb6f530 Fix: Push ICY metadata from upstream servers into the format's vc block 2020-10-11 13:18:18 +00:00
Philipp Schafft
d388ef1feb Fix: Send correct <iceresponse> for admin command manageauth
Note: This is only done in operation mode strict and for JSON output
      to avoid breaking older clients.
2020-10-11 10:03:22 +00:00
Philipp Schafft
9ad34f97ad Feature: Added JSON output for admin command manageauth 2020-10-11 08:51:38 +00:00
Philipp Schafft
5e9feb611a Feature: Added JSON output for admin commands listclients, listmounts, streamlist, moveclients, and updatemetadata 2020-10-11 08:18:55 +00:00
Philipp Schafft
25f23c4192 Feature: Added JSON output for admin commands showlog and dashboard 2020-10-10 20:59:39 +00:00
Philipp Schafft
4cec193029 Feature: Unify generic xml2json rendering with <icestats>, <iceresponse>, and report xml 2020-10-10 20:59:38 +00:00
Philipp Schafft
77ea98730b Feature: Added support for JSON rendering of report xml 2020-10-10 20:59:38 +00:00
Philipp Schafft
ea5b21b58c Feature: Added support for definition, and akindof to handle_node_identification() 2020-10-10 20:59:38 +00:00
Philipp Schafft
c900f0b18f Fix: Set xmlns for <icestats> in reports 2020-10-10 20:59:38 +00:00
Philipp Schafft
4a54efbc46 Feature: Include node identification for <iceresponse> messages 2020-10-10 20:59:38 +00:00
Philipp Schafft
36ff987e89 Feature: Unified node identification in a single function 2020-10-10 20:59:38 +00:00
Philipp Schafft
cc13aba182 Feature: Added constants for XML namespaces 2020-10-10 20:59:38 +00:00
Philipp Schafft
a8a3207cce Feature: Added node for node identification 2020-10-10 20:59:38 +00:00
Philipp Schafft
f52d7ae077 Feature: Added experimental STATS_JSON_REQUEST "stats.json" 2020-10-10 20:59:38 +00:00
Philipp Schafft
6ba8ab1db5 Update: Use different xmlns depending on root node 2020-10-10 20:59:38 +00:00
Philipp Schafft
2a4ed04671 Feature: Handle <max_listeners> and <authenticator> nicer 2020-10-10 20:59:38 +00:00
Philipp Schafft
02e9c048d0 Fix: Handle bytes >= 0x80 correctly 2020-10-10 20:59:37 +00:00
Philipp Schafft
61d68a13b4 Fix: Report sources correctly 2020-10-10 20:59:37 +00:00
Philipp Schafft
3af23324f0 Feature: Added that much of a XSPF -> JSPF renderer as we need 2020-10-10 20:59:37 +00:00
Philipp Schafft
758a67c475 Update: More aggressively use workaround for xmlns as property 2020-10-10 20:59:37 +00:00
Philipp Schafft
b9652444ff Feature: Workaround for xmlns set as property 2020-10-10 20:59:37 +00:00
Philipp Schafft
30f9e89e26 Feature: Added a basic renderer for <icestats> 2020-10-10 20:59:37 +00:00
Philipp Schafft
9be721723c Feature: Added function for writing boolean XML nodes as JSON 2020-10-10 20:59:37 +00:00
Philipp Schafft
adef1ef38e Feature: Added support for a container object holding a list of XML nodes 2020-10-10 20:59:37 +00:00
Philipp Schafft
7a9d42209e Update: Generify the render_node_legacyresponse() code a bit 2020-10-10 20:59:37 +00:00
Philipp Schafft
3fd16ac834 Feature: Added support for JSON output on <iceresponse>-style XML commands 2020-10-10 20:59:37 +00:00
Philipp Schafft
236c0dfa56 Feature: Added a renderer for <iceresponse>-style XML 2020-10-10 20:59:37 +00:00
Philipp Schafft
6fc7f21a11 Feature: Improved logic for selecting a specific renderer 2020-10-10 20:59:37 +00:00
Philipp Schafft
1666b478a1 Update: Only set namespace for reportxml if not used for XSLT 2020-10-10 20:59:37 +00:00
Philipp Schafft
5045271d3c Feature: Added infrastructure to send JSON as part of admin/ 2020-10-10 20:59:36 +00:00
Philipp Schafft
2130a80f70 Update: Changed xml2json_render_doc_simple's signature 2020-10-10 20:59:36 +00:00
Philipp Schafft
c7be3122db Feature: Added super basic logic for namespace based render selecting 2020-10-10 20:59:36 +00:00
Philipp Schafft
b44df0da76 Feature: Support JSON mapping for all reportxml based outputs 2020-10-10 20:59:36 +00:00
Philipp Schafft
deaad3246c Feature: Assign ADMIN_FORMAT_JSON 2020-10-10 20:59:36 +00:00
Philipp Schafft
731ac5c8e6 Feature: Added a basic outline of how converting could happen with a first generic mapping format 2020-10-10 20:59:36 +00:00
Philipp Schafft
395b994707 Fix: Set namespace correctly for child nodes 2020-10-10 20:59:36 +00:00
Philipp Schafft
34fa9f0ce3 Fix: Export xmlns as namespace not property 2020-10-10 20:59:36 +00:00
Philipp Schafft
7b5f52d77d Fix: Corrected memory allocator 2020-10-10 20:59:36 +00:00
Philipp Schafft
4cab251919 Feature: Added stub src/xml2json.[ch] 2020-10-10 20:59:36 +00:00
Philipp Schafft
dccf0e046a Feature: Added comments/docs for JSON renderer in the header 2020-10-10 20:59:36 +00:00
Philipp Schafft
9afbfcf40e Update: Made json_renderer_finish() take a pointer to the renderer 2020-10-10 20:59:35 +00:00
Philipp Schafft
2400df01ca Feature: Implement JSON renderer 2020-10-10 20:59:35 +00:00
Philipp Schafft
5a72f70dcb Feature: Outlined basic API 2020-10-10 20:59:35 +00:00
Philipp Schafft
261ee12c04 Feature: Added stub src/json.[ch] 2020-10-10 20:59:35 +00:00
Philipp Schafft
96d6190dbf Fix: Re-implemented <no-mount>.
Closes: #2335
2020-10-10 13:44:37 +00:00
Philipp Schafft
b9d00301e7 Update: Reformated code attaching a listener to a source 2020-10-10 13:21:19 +00:00
Philipp Schafft
3a6a7f6b5a Fix: Fixed usage of <shoutcast-compat> with <shoutcast-mount>.
Closes: #2363
2020-10-10 12:49:42 +00:00
Philipp Schafft
114a8b6b88 Update: Converted whether or not to show listeners in stats to a flag 2020-10-09 16:01:24 +00:00
Philipp Schafft
5eb09ca5de Update: Convert stats_get_xml() to take flags 2020-10-09 15:43:57 +00:00
Philipp Schafft
1a5359025c Fix: Do not allow the source to set random stats values'
If your software depends on those values you likely want to
use the corresponding audio_*-values.
2020-10-09 15:24:31 +00:00
Philipp Schafft
196a6170cc Feature: Pass query parameters to admin/ui/ templates 2020-10-09 11:10:51 +00:00
Philipp Schafft
12806c0853 Update: Added client_protocol_from_string() and client_protocol_to_string() 2020-10-03 18:35:40 +00:00
Philipp Schafft
d6fcedd5b8 Fix: Unref report after sending it 2020-10-03 11:57:27 +00:00
Philipp Schafft
d7f8911510 Feature: Added support for /admin/ui/ 2020-10-03 11:56:06 +00:00
Philipp Schafft
19b830e0d8 Feature: Support matching strings 2020-10-03 11:30:09 +00:00
Philipp Schafft
45818ae8bd Feature: Made the set fallback feature accessable via web interface
Not exactly new year, but at least German Unity Day.
2020-10-03 10:28:52 +00:00
Philipp Schafft
4da6d6e243 Update: Use helper functions for reportxml 2020-10-03 09:10:15 +00:00
Philipp Schafft
b01cb8d4e7 Feature: Added some basic helpers 2020-10-03 09:01:26 +00:00
Philipp Schafft
44af32bac5 Feature: Added stub src/reportxml_helper.[ch] 2020-10-03 08:51:22 +00:00
Philipp Schafft
b1c4b9ac49 Update: Updated copyright statements 2020-10-03 08:44:37 +00:00
Philipp Schafft
205489932d Update: Support a standard response for html_success() users in operation mode = strict 2020-10-03 08:18:10 +00:00
Philipp Schafft
48ff5ae0bf Cleanup: Replaced strdup-and-free with util_replace_string 2020-10-03 08:12:57 +00:00
Philipp Schafft
ddb94982b8 Cleanup: Removed demo Lorem ipsum 2020-10-03 08:00:39 +00:00
Philipp Schafft
c12cb226f1 Feature: Select default content for admin page via operation mode 2020-10-03 07:44:57 +00:00
Philipp Schafft
5da8971b2e Feature: Added a basic dashboard 2020-10-02 21:30:11 +00:00
Philipp Schafft
15dd9af54d Update: Made sane_hostname more formal config_problems and include flags for insane location and admin 2020-10-02 18:14:22 +00:00
Philipp Schafft
59efa2689c Cleanup: Made sending ADMIN_XSL_RESPONSE style responses much more uniform 2020-10-02 14:17:47 +00:00
Philipp Schafft
0c29ddd915 Feature: Added support to write a mark to the logfiles.
Note: This currently excludes the access.log

Closes: #2343
2020-10-02 13:36:22 +00:00
Philipp Schafft
fce09e5788 Update: Replaced some %s with %H 2020-10-02 13:06:28 +00:00
Philipp Schafft
72fbe999e2 Feature: Support updates of metadata URL via admin interface
Thanks to Joakim Lagerqvist.

Closes: #2385
2020-10-02 13:01:36 +00:00
Philipp Schafft
4896d73d3a Feature: Added support for logfile display in admin/ 2020-10-02 11:40:59 +00:00
Philipp Schafft
de270c535d Feature: Allow setting memory backlog for logfiles 2020-10-02 11:40:11 +00:00
Philipp Schafft
73dce0a692 Update: Updated list of valid types for <value> 2020-10-02 11:40:11 +00:00
Philipp Schafft
47dd475f12 Feature: Only show selected mounts in status display 2020-10-02 11:38:39 +00:00
Philipp Schafft
c6bb70d99b Feature: Include content-type in mount info for metadata updates 2020-10-02 11:38:39 +00:00
Philipp Schafft
f9980b3563 Feature: Added key <content-type> to running mounts 2020-10-02 11:38:38 +00:00
Philipp Schafft
6484fb40c6 Update: Updated submodules 2020-10-02 11:37:59 +00:00
Philipp Schafft
2bf77f2012 Feature: Support moving individual clients between mounts 2020-09-30 19:47:05 +00:00
Philipp Schafft
81bd709acc Fix: Corrected node vs. client 2020-09-30 19:22:36 +00:00
Philipp Schafft
d92c9758a6 Feature: Prepare for support to move single clients 2020-09-30 18:03:18 +00:00
Philipp Schafft
e86a46ee4a Update: Improved statistic update logic a bit 2020-09-30 17:59:54 +00:00
Philipp Schafft
4f56236cbc Fix: Corrected type for id for source_find_client() 2020-09-30 17:59:52 +00:00
Philipp Schafft
55acb32b71 Cleanup: Corrected code style 2020-09-30 17:59:49 +00:00
Philipp Schafft
b2cd834db7 Cleanup: Move lock out of loop as unlock is also outside the loop 2020-09-30 17:59:43 +00:00
Philipp Schafft
833d666803 Cleanup: Deduplicated code for client moves 2020-09-30 17:58:33 +00:00
Marvin Scholz
9275dfd8c8 Feature: Improve logging for yp-directory options parsing 2020-04-30 10:52:18 +02:00
Marvin Scholz
349c29ca48 Feature: Add "listen-socket" option for YP directories 2020-04-24 23:45:49 +02:00
Marvin Scholz
495ecbf57d Fix: Add missing space in YP log message 2020-04-23 19:01:02 +02:00
Marvin Scholz
632f67b0c8 Feature: New config block to define YP directories
Adds a new config block, <yp-directory> with the mandatory "url"
attribute and optional <option> entries in the block:

  <yp-directory url="http://example.org/yp-cgi">
    <option name="timeout" value="5" />
    <option name="touch-interval" value="45" />
  </yp-directory>
2020-04-23 18:40:36 +02:00
Marvin Scholz
6d3bf28be1 Update: Use linked list for YP config entries
This removes the limit of 25 YP directory entries by using a linked
list like with most other config entries.
2020-04-23 05:14:12 +02:00
Marvin Scholz
4284ea5b3b Cleanup: Prepare migration to new yp options 2020-04-23 03:18:51 +02:00
Marvin Scholz
f2547c7cb0 Cleanup: Remove unused touch_interval config 2020-04-23 03:03:52 +02:00
Marvin Scholz
271ef864ac Cleanup: Remove unused server block in directory
The director block for YP directories accepted a server block which
was completely unused in the whole codebase, so do not parse it in
the first place.
2020-04-23 03:00:32 +02:00
Philipp Schafft
dcdd96c000 Update: Make listensocket_container_get_by_id() public 2020-04-22 19:35:35 +00:00
Marvin Scholz
f898da63b8 Cleanup: YP: Narrow variable scope 2020-04-21 20:43:01 +02:00
Marvin Scholz
e534df86f8 Fix: YP: Improve error handling
In case the url written by client_get_baseurl exceeds the length and
the realloc failed, previously the truncated URL would have been used.

The error case (ret < 0) was not handled at all before.
2020-04-21 20:43:01 +02:00
Marvin Scholz
7563fe9e52 Fix: YP: Send correct listener URL in case of TLS 2020-04-21 20:12:22 +02:00
Marvin Scholz
2b56f73cfb Cleanup: Do not name variable same as hex function 2020-04-19 04:14:07 +02:00
Marvin Scholz
386a461016 Fix: Fixed check for icecast_kva_t value 2020-04-19 04:10:28 +02:00
Marvin Scholz
e6856c153e Cleanup: Fix order of arguments in forward declaration 2020-04-19 04:05:24 +02:00
Marvin Scholz
b93ac5a94e Fix: Fixed check for root node in reportxml 2020-04-19 03:58:31 +02:00
Marvin Scholz
0c3da2df86 Cleanup: Simplify client_complete
Instead of using a "have" variable which makes it a bit confusing
to understand whats going on, use a do {} while (0) and break from it
instead.
2020-04-19 03:43:27 +02:00
Marvin Scholz
4b2d38fcfc Cleanup: Remove duplicated check 2020-04-19 03:32:59 +02:00
Marvin Scholz
3352ddfb36 Cleanup: Remove redundant check
It's already checked earlier if auth is non-NULL, so this check
here is not needed.
2020-04-19 03:28:21 +02:00
Marvin Scholz
25f54db863 Fix: Reorder logging initialization to prevent race
Without this, the logging on the stats thread would race with the log
initialization on the main thread.
2020-04-19 03:09:49 +02:00
Marvin Scholz
d2b137a8ad Fix: Fixed memory leak on relay parsing failure 2020-04-19 03:02:03 +02:00
Philipp Schafft
2ffaa92ea6 Fix: Fixed two double-unlock errors 2020-02-14 14:05:01 +00:00
Philipp Schafft
97181fb112 Updated submodules 2020-02-12 11:13:46 +00:00
Philipp Schafft
6ca6283cb4 Fix: Fixed invalid locking.
* listensocket_get_listener() must always be called with a matching call
  to listensocket_release_listener
* No ticket for this, but may be related to #2372.
* Found an reported by Xogium on IRC.

See: #2372
2019-11-22 14:48:49 +00:00
Philipp Schafft
ddafdd971f Fix: Strange patch for ICY 2019-09-17 18:08:57 +00:00
Philipp Schafft
f83fe87ab9 Update: Added some debugging lines 2019-09-17 17:32:00 +00:00
Philipp Schafft
cf9c8cf9ad Fix: Fixed leak in codec Speex codec probing code.
Thanks to Xogium for finding and debugging this!

Fixes: #2377
2019-06-28 08:03:51 +00:00
Philipp Schafft
1b94dea420 Update: Improved connecting-the-dots regarding clients and object IDs 2019-06-26 08:23:29 +00:00
Philipp Schafft
3761582ab8 Update: Mark a few developer level debugging messages as such 2019-05-28 07:55:18 +00:00
Philipp Schafft
fff3a5c6a6 Update: Write a error level message on admin/ based metadata updates we reject 2019-05-28 07:52:47 +00:00
Philipp Schafft
e60a36bfb6 Fix: Corrected log output from <unknown< to <unknown> 2019-05-28 07:02:45 +00:00