Such checks make debugging harder but serve no useful purpose otherwise.
We got rid of all the checks for root, let's kill those too.
Server server;
int r = EXIT_FAILURE, n;
- if (getppid() != 1) {
- log_error("This program should be invoked by init only.");
- return EXIT_FAILURE;
- }
-
if (argc > 1) {
log_error("This program does not take arguments.");
return EXIT_FAILURE;
};
int r;
- if (getppid() != 1)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
- "This program should be invoked by init only.");
if (argc != 2)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"This program requires one argument.");