1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-01 09:47:35 +03:00

update-utmp,initctl: drop ppid check

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-07-02 13:44:43 +02:00
parent 830ffbce1b
commit bc9d1dbfc8
2 changed files with 0 additions and 8 deletions

View File

@ -341,11 +341,6 @@ int main(int argc, char *argv[]) {
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;

View File

@ -223,9 +223,6 @@ static int run(int argc, char *argv[]) {
};
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.");