So we can report receive buffer size.
Important for route(4) overflow so we can try and set a bigger buffer.
#endif
#ifdef PRIVSEP_RIGHTS
+ /* We need to getsockopt for SO_RCVBUF and
+ * setsockopt for RO_MISSFILTER. */
if (IN_PRIVSEP(ctx))
- ps_rights_limit_fd_setsockopt(ctx->link_fd);
+ ps_rights_limit_fd_sockopt(ctx->link_fd);
#endif
return 0;
}
int
-ps_rights_limit_fd_setsockopt(int fd)
+ps_rights_limit_fd_sockopt(int fd)
{
cap_rights_t rights;
- cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_EVENT, CAP_SETSOCKOPT);
+ cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_EVENT,
+ CAP_GETSOCKOPT, CAP_SETSOCKOPT);
if (cap_rights_limit(fd, &rights) == -1 && errno != ENOSYS)
return -1;
return 0;
int ps_rights_limit_ioctl(int);
int ps_rights_limit_fd_fctnl(int);
int ps_rights_limit_fd_rdonly(int);
-int ps_rights_limit_fd_setsockopt(int);
+int ps_rights_limit_fd_sockopt(int);
int ps_rights_limit_fd(int);
int ps_rights_limit_fdpair(int []);
#endif