1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Do exit if LISTEN_PID environment variable not correct during systemd handover.

This commit is contained in:
Peter Rajnoha 2012-03-16 21:30:53 +00:00
parent d13c952ee4
commit 45d7997514

View File

@ -177,7 +177,7 @@ static int _systemd_handover(struct daemon_state *ds)
env_pid = strtoul(e, &p, 10);
if (errno || !p || *p || env_pid <= 0 ||
getpid() != (pid_t) env_pid)
;
goto out;
/* LISTEN_FDS must be 1 and the fd must be a socket! */
if (!(e = getenv(SD_LISTEN_FDS_ENV_VAR_NAME)))