2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Pass closure to callback, not the callback pointer itself.

This commit is contained in:
Todd C. Miller
2023-03-10 11:19:37 -07:00
parent fc253048f5
commit cb7b1dd89c

View File

@@ -132,7 +132,7 @@ sudo_suspend_parent_v1(int signo, pid_t my_pid, pid_t my_pgrp, pid_t cmnd_pid,
/* Run callback before we suspend. */
if (callback != NULL)
callback(callback, signo);
callback(closure, signo);
if (signo == SIGTSTP) {
memset(&sa, 0, sizeof(sa));
@@ -151,7 +151,7 @@ sudo_suspend_parent_v1(int signo, pid_t my_pid, pid_t my_pgrp, pid_t cmnd_pid,
/* Run callback on resume. */
if (callback != NULL)
callback(callback, SIGCONT);
callback(closure, SIGCONT);
if (saved_pgrp != -1) {
/*