Skip to content

Commit

Permalink
OS-4465 journald shuts down due to missing SO_TIMESTAMP socket support
Browse files Browse the repository at this point in the history
  • Loading branch information
jjelinek committed Jul 8, 2015
1 parent 5a7834d commit 9a576e2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions usr/src/lib/brand/lx/lx_brand/common/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,21 @@ lx_setsockopt(int sockfd, int level, int optname, void *optval, int optlen)
if (optname == LX_SO_BSDCOMPAT)
return (0);

if (optname == LX_SO_TIMESTAMP) {
struct sockaddr nm;
socklen_t nmlen = sizeof (nm);

/*
* SO_TIMESTAMP is not supported on AF_UNIX sockets
* but we have some of those which apps use for
* logging, etc., so pretend this worked.
*/
if (getsockname(sockfd, &nm, &nmlen) == 0 &&
nm.sa_family == AF_UNIX) {
return (0);
}
}

/* Convert bpf program struct */
if (optname == LX_SO_ATTACH_FILTER) {
struct lx_bpf_program *lbp;
Expand Down

0 comments on commit 9a576e2

Please sign in to comment.