diff options
author | Jan Vaclav <jvaclav@redhat.com> | 2023-09-11 11:42:47 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-10-03 06:25:18 +0000 |
commit | 28f7a6638f751ca1601d767297e9b03b7fdc1f5a (patch) | |
tree | 1d28a8bc82b9b9c456b2c5e64028f28074a3d339 | |
parent | ffc377ecc6ea23234f03ac0294e319ac7a1998da (diff) |
main: don't limit upper bound of pid when checking pidfile
This commit removes the upper bound check for the PID, letting NetworkManager recognize a PID from the pidfile higher than 2^16.
The PID limit is often set higher than 2^16 (65536) on 64-bit systems, resulting in the pidfile being ignored and subsequently deleted if the currently running instance of NetworkManager has a pid higher than 2^16.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1727
-rw-r--r-- | src/core/main-utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/main-utils.c b/src/core/main-utils.c index c6fa05c0ca..3c210896ee 100644 --- a/src/core/main-utils.c +++ b/src/core/main-utils.c @@ -174,7 +174,7 @@ nm_main_utils_ensure_not_running_pidfile(const char *pidfile) errno = 0; pid = strtol(contents, NULL, 10); - if (pid <= 0 || pid > 65536 || errno) + if (pid <= 0 || errno) return; nm_clear_g_free(&contents); |