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

122 Commits

Author SHA1 Message Date
Philipp Schafft
185b130a89 Fix: Corrected log level from WARN to INFO for system config output 2022-03-11 12:32:54 +00:00
Philipp Schafft
4db6127464 Update: Updated copyright years 2022-03-01 11:17:28 +00:00
Philipp Schafft
66c9172424 Feature: Report hostname, location, and admin from config to log 2022-03-01 08:36:06 +00:00
Philipp Schafft
e6ab93d437 Update: Fixed some compiler warnings 2022-02-25 23:40:44 +00:00
Philipp Schafft
66375b57e4 Cleanup: Got argv[] parser into better shape 2022-02-25 23:40:44 +00:00
Philipp Schafft
00368b68e8 Cleanup: Converted some int -> bool 2022-02-25 23:40:44 +00:00
Philipp Schafft
cf6fad00bd Feature: Added support for a mountpoint identifier 2021-07-26 15:05:54 +00:00
Philipp Schafft
9e852dae50 Feature: Added a global client list 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
70419a33b5 Feature: Added PRNG 2021-07-26 15:05:04 +00:00
Philipp Schafft
b1c4b9ac49 Update: Updated copyright statements 2020-10-03 08:44:37 +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
de270c535d Feature: Allow setting memory backlog for logfiles 2020-10-02 11:40:11 +00: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
Philipp Schafft
63cc9b9c2a Feature: Also route slow events to fastevent subsystem 2018-08-08 14:05:41 +00:00
Philipp Schafft
23e7069d78 Update: Initialize/Shutdown fast event subsystem 2018-08-08 14:05:40 +00:00
Philipp Schafft
4279a6caea Update: Make use of listensocket_container_set_sockcount_cb() and listensocket_container_sockcount()
This fixes the starts-up-with-no-listen-sockets bug.
2018-06-30 13:10:08 +00:00
Philipp Schafft
5490120d4d Update: Rewrote listen socket handling code comepletly.
This moves all the listen socket code into a nice and abstracting file.

Notes:
* Altering listen socket setup does not yet work on config reload.
  (Did it ever work?)
* Server will start with no listen sockets. (There are unconfirmed
  rumours it sometimes(?) did before.) This is to be re-implemented
  in another commit. It can also be improved to work allow checking
  on reload or other config changes.
* For slave connections the server address is now checked against
  the allow/deny-IP list.
2018-06-30 13:10:08 +00:00
Philipp Schafft
5d815f2205 Feature: Added a global module container object 2018-06-19 12:56:40 +00:00
Philipp Schafft
059bfdc7ce Cleanup: Corrected headers used in code 2018-06-17 12:47:35 +00:00
Philipp Schafft
6f7881a875 Update: Allow update of pidfile on the fly. 2018-06-16 17:53:29 +00:00
Philipp Schafft
a2763ac9e4 Update: Improved pidfile error handling 2018-06-16 17:51:16 +00:00
Philipp Schafft
23cc8a9646 Cleanup: Mark local functions static 2018-06-16 17:51:16 +00:00
Philipp Schafft
be0bf035c7 Update: Added comments to make code easier to understand 2018-06-16 17:38:35 +00:00
Philipp Schafft
2b3f07e9b0 Feature: Allow using default config filename.
This uses the new configure option --with-default-config=PATH.
2018-06-16 17:33:14 +00:00
Philipp Schafft
452c2b17d3 Fix: Use size_t not int 2018-06-16 17:30:42 +00:00
Philipp Schafft
beb4523b84 Cleanup: Replaced magic number with sizeof() 2018-06-16 17:29:51 +00:00
Philipp Schafft
8a69db3ab7 Update: Allow running as root IF Icecast has PID=1 2018-06-16 17:28:42 +00:00
Philipp Schafft
cc0f62df89 Update: Log PID on process startup. 2018-06-16 17:27:59 +00:00
Philipp Schafft
b42378abc4 Feature: Generate errors based on IDs.
This generates error pages based on IDs. This allows to reuse errors
and add more advanced information to them.

This patch also makes Icecast send in plain text OR HTML based
on the clients Accept:-string.
2018-05-07 16:28:46 +00:00
Philipp Schafft
64b16f8296 Update: Abstracted the TLS context code into tls.c 2017-07-23 13:14:48 +00:00
Philipp Schafft
7402383448 Cleanup: move libcurl specifc code into curl.c
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].

Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
  According to the manpage for curl_easy_setopt()/CURLOPT_URL
  there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
  as User-Agent:, this has be corrected to what is set in the config
  file.
* As curl.c is now a single point for setting parameters all the TLS
  parameters should be reviewed and set (based on config).

Please test!
2015-04-08 07:44:36 +00:00
Philipp Schafft
11d5dffd49 Cleanup: Removed tailing spaces 2015-01-10 18:53:44 +00:00
Philipp Schafft
e9a90f9918 Cleanup: converted tabs into spaces 2015-01-10 01:48:15 +00:00
Philipp Schafft
0b1af34f0e Prevent various redefined definitions in win32-specific code
From: Erik van Pienbroek <epienbro@fedoraproject.org>
Date: Mon, 22 Dec 2014 18:02:09 +0100
2014-12-24 11:35:56 +00:00
Philipp Schafft
8a4c529347 Cleanup: make strcmp() more explicit in _start_logging()
This avoids if(strcmp()) constructs in favor of if(strcmp() == 0)
constructs. This is aligned with coding style and will improve
readability of the code.

Thanks to miksago. closes #2102
2014-12-14 08:19:58 +00:00
Philipp Schafft
bdcf008b7c Added <event>: Unified handling of events.
<event> has been added and can be used within <kartoffelsalat>
both in <icecast> and <mount>.
<event> takes backend depending <option> child tags.
Currently supported backends:
 - log: send message to error log.
 - exec: executes a program or script.
 - url: delivers the event via HTTP.

within <mount> <on-connect> and <on-disconnect> has been replaced by
<event>. Config parser can on-the-fly convert old tags.
Also <authentication type="url"> within <mount> has been fixed
for those cases with <option name="mount_add" .../> and
<option name="mount_remove" .../> which are now on-the-fly converted
by the parser to corresponding <event> tags.

Please also see TAGs added as per #2098. Some include hints for
documentation updates needed after this change. Those updates
should take place before 2.4.2.
2014-12-08 00:39:57 +00:00
Marvin Scholz
1bf41cfdb6 Epic Git migration commit
Added .gitignore and submodules
Changed paths to match new location of things
2014-12-02 22:50:57 +01:00
Philipp Schafft
93194594f7 better coding style, patch by ePirat. refs #2059
svn path=/icecast/trunk/icecast/; revision=19376
2014-11-30 20:32:30 +00:00
Philipp Schafft
7a27cacf0b updated chroot and setuid/gid support. Thanks to d26264b9 for reporting. close #2096
svn path=/icecast/trunk/icecast/; revision=19365
2014-11-29 10:34:07 +00:00
Philipp Schafft
503059f481 (sync with my branch) report system name and print better warnings about <hostname> at start of process
svn path=/icecast/trunk/icecast/; revision=19339
2014-11-20 18:41:42 +00:00
Philipp Schafft
78ca9bd2ba updated some copyright headers
svn path=/icecast/trunk/icecast/; revision=19278
2014-11-07 22:06:06 +00:00
Philipp Schafft
0b7e65c3c9 send errorlog (loglevel WARN) to stderr prior to opening the real logfiles. closes #1886
svn path=/icecast/trunk/icecast/; revision=19271
2014-11-07 11:18:54 +00:00
Philipp Schafft
e6ce60e630 rename ICE_LISTEN_QUEUE, ICE_RUNNING and ICE_HALTING so they have a prefix of ICECAST_
svn path=/icecast/trunk/icecast/; revision=19258
2014-10-31 09:00:45 +00:00
Philipp Schafft
2b7cb1c641 LOG_{ERROR|WARN|INFO|DEBUG}() -> ICECAST_LOG_{ERROR|WARN|INFO|DEBUG}(); this is to avoid collision with LOG_INFO that is defined as part of syslog.
svn path=/icecast/trunk/icecast/; revision=19257
2014-10-31 08:46:58 +00:00
Philipp Schafft
634ab4ffc2 fix warnings, mostly related to win*-builds
svn path=/icecast/trunk/icecast/; revision=19246
2014-10-18 16:25:29 +00:00
Philipp Schafft
7ae4664780 Replace the old logging macros with variadic argument macros. (patch by ePirat) (close #2058)
svn path=/icecast/trunk/icecast/; revision=19229
2014-10-09 10:39:13 +00:00
Thomas B. "dm8tbr" Ruecker
53e6ee7abb SECURITY FIX - Override supplementary groups
In case of <changeowner> only UID and GID were changed, 
supplementary groups were left in place.
This is a potential security issue only if <changeowner> is used.
New behaviour is to set UID, GID and set supplementary groups 
based on the UID
Even in case of icecast remaining in supplementary group 0 
this "only" gives it things like access to files that are owned 
by group 0 and according to their umask. This is obviously bad,
but not as bad as UID 0 with all its other special rights.
It's a security issue and we fix immediately and recommend users to update.

PS: Cherry picking this should be fine by distros for fixing older releases.

svn path=/icecast/trunk/icecast/; revision=19137
2014-05-06 04:53:24 +00:00
Thomas B. "dm8tbr" Ruecker
2cf9930e91 Reverting r18945 for now as using -b breaks things.
Reopening #1886

svn path=/icecast/trunk/icecast/; revision=19100
2014-03-01 17:37:38 +00:00
Thomas B. "dm8tbr" Ruecker
5a26946236 This patch closes ticket #1886.
I've rethought the approach and found a much cleaner way. 
We now split handling of command line arguments into two parts.
Only the critical part of getting the config file is done first (and -v as it prevents startup).
The rest (currently only -b) is deferred.

This achieves the important bit why #1886 was created. 
It allows us to log error messages to stderr even if the -b argument is passed.
This is mainly for the case where the logfile or TCP port can't be opened.

svn path=/icecast/trunk/icecast/; revision=18945
2013-05-15 16:45:55 +00:00