Bug #2816 ยป 0001-Set-user-and-group-before-init.patch
src/main.c | ||
---|---|---|
878 | 878 |
} |
879 | 879 |
} |
880 | 880 | |
881 |
uuid_init(); |
|
882 |
config_boot(opt_config, gid, uid); |
|
883 |
tcp_server_preinit(opt_ipv6); |
|
884 |
http_server_init(opt_bindaddr); // bind to ports only |
|
885 |
htsp_init(opt_bindaddr); // bind to ports only |
|
886 |
satip_server_init(opt_satip_rtsp); // bind to ports only |
|
887 | ||
888 |
if (opt_fork) |
|
889 |
pidfile = tvh_fopen(opt_pidpath, "w+"); |
|
890 | ||
891 | 881 |
if (gid != -1 && (getgid() != gid) && setgid(gid)) { |
892 | 882 |
tvhlog(LOG_ALERT, "START", |
893 | 883 |
"setgid(%d) failed, do you have permission?", gid); |
... | ... | |
899 | 889 |
return 1; |
900 | 890 |
} |
901 | 891 | |
892 |
uuid_init(); |
|
893 |
config_boot(opt_config, gid, uid); |
|
894 |
tcp_server_preinit(opt_ipv6); |
|
895 |
http_server_init(opt_bindaddr); // bind to ports only |
|
896 |
htsp_init(opt_bindaddr); // bind to ports only |
|
897 |
satip_server_init(opt_satip_rtsp); // bind to ports only |
|
898 | ||
899 |
if (opt_fork) |
|
900 |
pidfile = tvh_fopen(opt_pidpath, "w+"); |
|
901 | ||
902 | 902 |
/* Daemonise */ |
903 | 903 |
if(opt_fork) { |
904 | 904 |
if(daemon(0, 0)) { |
905 |
- |