diff options
Diffstat (limited to 'src/starter/starter.c')
-rw-r--r-- | src/starter/starter.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/starter/starter.c b/src/starter/starter.c index 51a42a504..8ca1af29c 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -276,7 +276,7 @@ static bool check_pid(char *pid_file) pid = atoi(buf); } fclose(pidfile); - if (pid && kill(pid, 0) == 0) + if (pid && pid != getpid() && kill(pid, 0) == 0) { /* such a process is running */ return TRUE; } @@ -477,6 +477,7 @@ int main (int argc, char **argv) } } +#ifndef STARTER_ALLOW_NON_ROOT /* verify that we can start */ if (getuid() != 0) { @@ -484,6 +485,7 @@ int main (int argc, char **argv) cleanup(); exit(LSB_RC_NOT_ALLOWED); } +#endif if (check_pid(pid_file)) { @@ -520,6 +522,7 @@ int main (int argc, char **argv) exit(LSB_RC_INVALID_ARGUMENT); } +#ifndef SKIP_KERNEL_IPSEC_MODPROBES /* determine if we have a native netkey IPsec stack */ if (!starter_netkey_init()) { @@ -530,6 +533,7 @@ int main (int argc, char **argv) DBG1(DBG_APP, "no known IPsec stack detected, ignoring!"); } } +#endif last_reload = time_monotonic(NULL); |