2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Write process ID as an unsigned int (with a cast).

On Solaris, pid_t may be typedef'd as a long but the actual range
is 32 bits at most.
This commit is contained in:
Todd C. Miller 2020-03-29 09:11:57 -06:00
parent d4b2db9078
commit c122e9bf62

View File

@ -1680,7 +1680,7 @@ daemonize(bool nofork)
if (fp == NULL) {
sudo_warn("%s", logsrvd_conf_pid_file());
} else {
fprintf(fp, "%d\n", getpid());
fprintf(fp, "%u\n", (unsigned int)getpid());
fclose(fp);
}
}