mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
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
This commit is contained in:
parent
ffc377ecc6
commit
28f7a6638f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue