mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Move fserve_initialize() to later so that chroot() works right.
svn path=/trunk/icecast/; revision=3877
This commit is contained in:
parent
e9b1e40089
commit
07de3c2dd7
@ -60,7 +60,6 @@ static void _initialize_subsystems(void)
|
|||||||
global_initialize();
|
global_initialize();
|
||||||
refbuf_initialize();
|
refbuf_initialize();
|
||||||
xslt_initialize();
|
xslt_initialize();
|
||||||
fserve_initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _shutdown_subsystems(void)
|
static void _shutdown_subsystems(void)
|
||||||
@ -265,14 +264,14 @@ int main(int argc, char **argv)
|
|||||||
int res, ret;
|
int res, ret;
|
||||||
char filename[256];
|
char filename[256];
|
||||||
|
|
||||||
/* startup all the modules */
|
|
||||||
_initialize_subsystems();
|
|
||||||
|
|
||||||
/* parse the '-c icecast.xml' option
|
/* parse the '-c icecast.xml' option
|
||||||
** only, so that we can read a configfile
|
** only, so that we can read a configfile
|
||||||
*/
|
*/
|
||||||
res = _parse_config_file(argc, argv, filename, 256);
|
res = _parse_config_file(argc, argv, filename, 256);
|
||||||
if (res == 1) {
|
if (res == 1) {
|
||||||
|
/* startup all the modules */
|
||||||
|
_initialize_subsystems();
|
||||||
|
|
||||||
/* parse the config file */
|
/* parse the config file */
|
||||||
ret = config_parse_file(filename);
|
ret = config_parse_file(filename);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -296,7 +295,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else if (res == -1) {
|
} else if (res == -1) {
|
||||||
_print_usage();
|
_print_usage();
|
||||||
_shutdown_subsystems();
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +311,7 @@ int main(int argc, char **argv)
|
|||||||
_ch_root_uid_setup(); /* Change user id and root if requested/possible */
|
_ch_root_uid_setup(); /* Change user id and root if requested/possible */
|
||||||
|
|
||||||
stats_initialize(); /* We have to do this later on because of threading */
|
stats_initialize(); /* We have to do this later on because of threading */
|
||||||
|
fserve_initialize(); /* This too */
|
||||||
|
|
||||||
#ifdef CHUID
|
#ifdef CHUID
|
||||||
/* We'll only have getuid() if we also have setuid(), it's reasonable to
|
/* We'll only have getuid() if we also have setuid(), it's reasonable to
|
||||||
|
Loading…
Reference in New Issue
Block a user