#include "bus-internal.h"
#include "bus-message.h"
+#define SNDBUF_SIZE (8*1024*1024)
+
static void iovec_advance(struct iovec iov[], unsigned *idx, size_t size) {
while (size > 0) {
enable = !b->bus_client && (b->attach_flags & KDBUS_ATTACH_SECLABEL);
setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
- /* Increase the buffers to a MB */
- fd_inc_rcvbuf(b->input_fd, 1024*1024);
- fd_inc_sndbuf(b->output_fd, 1024*1024);
+ /* Increase the buffers to 8 MB */
+ fd_inc_rcvbuf(b->input_fd, SNDBUF_SIZE);
+ fd_inc_sndbuf(b->output_fd, SNDBUF_SIZE);
/* Get the peer for socketpair() sockets */
l = sizeof(b->ucred);
if (getsockopt(b->input_fd, SOL_SOCKET, SO_PEERCRED, &b->ucred, &l) >= 0 && l >= sizeof(b->ucred))
b->ucred_valid = b->ucred.pid > 0;
+ b->is_kernel = false;
+ b->message_version = 1;
+ b->message_endian = 0;
+
return 0;
}
close_nointr_nofail(s[1]);
b->output_fd = b->input_fd = s[0];
+ r = bus_socket_setup(b);
+ if (r < 0)
+ return r;
+
return bus_socket_start_auth(b);
}