diff options
author | Peter Jones <pjones@redhat.com> | 2009-03-17 14:53:04 -0400 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2009-03-17 15:06:29 -0400 |
commit | d81a869f54f5d8b0a3c9ab6660551725b39912e2 (patch) | |
tree | 4f09e4311c26378b7a3ea3e560aafe91b0e4c7eb | |
parent | 96db800bbe61c6262a17ca806f782f7852d3e459 (diff) | |
download | anaconda-d81a869f54f5d8b0a3c9ab6660551725b39912e2.tar.gz anaconda-d81a869f54f5d8b0a3c9ab6660551725b39912e2.tar.xz anaconda-d81a869f54f5d8b0a3c9ab6660551725b39912e2.zip |
Fix ppoll() timeout=infinity usage in auditd (#484721).
{-1,-1} isn't the right way to send infinity to ppoll(), NULL is.
-rw-r--r-- | isys/auditd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/isys/auditd.c b/isys/auditd.c index bbc626711..8eef4f393 100644 --- a/isys/auditd.c +++ b/isys/auditd.c @@ -48,7 +48,7 @@ static void do_auditd(int fd) { sigset_t sigs; struct sigaction sa; struct pollfd pds = { - .events = POLLIN | POLLPRI | POLLERR | POLLHUP | POLLMSG, + .events = POLLIN, .revents = 0, .fd = fd, }; @@ -71,13 +71,12 @@ static void do_auditd(int fd) { sigdelset(&sigs, SIGHUP); while (1) { - struct timespec timeout = { -1, -1 }; int retval; memset(&rep, 0, sizeof(rep)); do { - retval = ppoll(&pds, 1, &timeout, &sigs); + retval = ppoll(&pds, 1, NULL, &sigs); } while (retval == -1 && errno == EINTR && !done); if (done) |