summaryrefslogtreecommitdiff
path: root/src/libs6/s6_fdholder_setdump.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-23 16:07:31 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-23 16:07:31 +0000
commite62d3ae45e9bf3b97551b8879bf6c441ff961ec1 (patch)
tree239987a77426dac08b2877b8e0afab5d4aae6eff /src/libs6/s6_fdholder_setdump.c
parent2c922d2f9870ef174894a6b91399d5cd59318352 (diff)
downloads6-e62d3ae45e9bf3b97551b8879bf6c441ff961ec1.tar.xz
- add s6_accessrules_params_free
- some libfdholder debug
Diffstat (limited to 'src/libs6/s6_fdholder_setdump.c')
-rw-r--r--src/libs6/s6_fdholder_setdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs6/s6_fdholder_setdump.c b/src/libs6/s6_fdholder_setdump.c
index e5825dc..61c238c 100644
--- a/src/libs6/s6_fdholder_setdump.c
+++ b/src/libs6/s6_fdholder_setdump.c
@@ -2,6 +2,7 @@
#include <errno.h>
#include <skalibs/uint32.h>
+#include <skalibs/allreadwrite.h>
#include <skalibs/bytestr.h>
#include <skalibs/error.h>
#include <skalibs/tai.h>
@@ -25,7 +26,7 @@ int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigne
uint32_pack_big(pack+1, ntot) ;
if (!unixmessage_put(&a->connection.out, &m)) return 0 ;
if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ;
- if (!unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) return 0 ;
+ if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) return 0 ;
if (!m.len || m.nfds) { unixmessage_drop(&m) ; return (errno = EPROTO, 0) ; }
if (m.s[0]) return (errno = m.s[0], 0) ;
if (m.len != 5) return (errno = EPROTO, 0) ;
@@ -58,7 +59,7 @@ int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigne
if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ;
{
unixmessage_t m ;
- if (!unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) return 0 ;
+ if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) return 0 ;
if (m.len != 1 || m.nfds)
{
unixmessage_drop(&m) ;