fix failing fd passing message by passing needed buffer size
authorNoel Power <noel.power@suse.com>
Wed, 18 Mar 2015 18:15:17 +0000 (18:15 +0000)
committerMichael Adam <obnox@samba.org>
Thu, 19 Mar 2015 17:02:13 +0000 (18:02 +0100)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/lib/unix_msg/unix_msg.c

index f2422490e6f7db4a2f1553ae1edd75d7814dcf68..7cb1936910f64bfdc16c5bd3bb0f14bc3d767b1d 100644 (file)
@@ -627,7 +627,7 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx,
 
        {
                uint8_t buf[fdlen];
-               msghdr_prep_fds(&msg, buf, 0, fds, num_fds);
+               msghdr_prep_fds(&msg, buf, fdlen, fds, num_fds);
 
                ret = sendmsg(ctx->sock, &msg, 0);
        }