Re: [RFC PATCH 1/2] net: af_unix: Useful handling of LSM denials on SCM_RIGHTS

From: Jori Koolstra

Date: Mon May 04 2026 - 13:46:07 EST



> Op 02-05-2026 03:24 CEST schreef Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>:
>
> > >
> > > Does this flag need per-recvmsg() granularity ?
> > >
> >
> > Perhaps not. What would be the alternative? A fcntl option for the socket fd?
>
> I'd add a new socket option like
>
> setsockopt(SOL_SOCKET, SO_RIGHTS_TRUNC, &(int){0}, sizeof(int));
>
>

I think this is reasonable suggestion (and better than using the MSG_ flags).
Let's just let this sit for a few days to see if anyone else has suggestions/
objections.