From: Zbigniew Jędrzejewski-Szmek Date: Thu, 2 Jul 2020 11:44:43 +0000 (+0200) Subject: update-utmp,initctl: drop ppid check X-Git-Tag: v246-rc1~33^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc9d1dbfc827c22ace2e5fb6755f7e7b93aba3b1;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c index 7505512fe7e..7b93de0d8ab 100644 --- a/src/initctl/initctl.c +++ b/src/initctl/initctl.c @@ -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; diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index fd24cdc789a..28f1aadabcb 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -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.");