1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Now checking the video directory after setting the user id

This commit is contained in:
Klaus Schmidinger 2022-12-12 10:27:38 +01:00
parent 15f13ac936
commit 7fe59548cd
2 changed files with 10 additions and 9 deletions

View File

@ -9816,7 +9816,7 @@ Video Disk Recorder Revision History
- Added missing rounding when dividing frequencies in processing the NIT (thanks to - Added missing rounding when dividing frequencies in processing the NIT (thanks to
Winfried Köhler). Winfried Köhler).
2022-12-07: 2022-12-12:
- Fixed a compiler warning. - Fixed a compiler warning.
- Fixed generating the index file in the cutter (reported by Christoph Haubrich). - Fixed generating the index file in the cutter (reported by Christoph Haubrich).
@ -9831,3 +9831,4 @@ Video Disk Recorder Revision History
- Now avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there - Now avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there
are no areas (thanks to Marko Mäkelä). are no areas (thanks to Marko Mäkelä).
- Avoiding a zero sized array in cDevice::GetDevice() (thanks to Marko Mäkelä). - Avoiding a zero sized array in cDevice::GetDevice() (thanks to Marko Mäkelä).
- Now checking the video directory after setting the user id.

16
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.tvdr.de * The project's page is at http://www.tvdr.de
* *
* $Id: vdr.c 5.10 2022/11/28 10:44:01 kls Exp $ * $Id: vdr.c 5.11 2022/12/12 10:27:38 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -651,13 +651,6 @@ int main(int argc, char *argv[])
if (SysLogLevel > 0) if (SysLogLevel > 0)
openlog("vdr", LOG_CONS, SysLogTarget); // LOG_PID doesn't work as expected under NPTL openlog("vdr", LOG_CONS, SysLogTarget); // LOG_PID doesn't work as expected under NPTL
// Check the video directory:
if (!DirectoryOk(VideoDirectory, true)) {
fprintf(stderr, "vdr: can't access video directory %s\n", VideoDirectory);
return 2;
}
// Daemon mode: // Daemon mode:
if (DaemonMode) { if (DaemonMode) {
@ -692,6 +685,13 @@ int main(int argc, char *argv[])
} }
} }
// Check the video directory:
if (!DirectoryOk(VideoDirectory, true)) {
fprintf(stderr, "vdr: can't access video directory %s\n", VideoDirectory);
return 2;
}
isyslog("VDR version %s started", VDRVERSION); isyslog("VDR version %s started", VDRVERSION);
if (StartedAsRoot && VdrUser) if (StartedAsRoot && VdrUser)
isyslog("switched to user '%s'", VdrUser); isyslog("switched to user '%s'", VdrUser);