Skip to content

Commit 03b7cc7

Browse files
committed
wishlist: add two new items
1 parent cfd3acb commit 03b7cc7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,32 @@ speaking the 2nd idea makes the 1st idea half-way redundant.
663663
so on) needs this, so that it can reasonably handle SELinux AVC errors
664664
on received messages.
665665

666+
### Reasonable EOF on SOCK_SEQPACKET
667+
668+
Zero size datagrams cannot be distinguished from EOF on
669+
`SOCK_SEQPACKET`. Both will cause `recvmsg()` to return zero.
670+
671+
Idea how to improve things: maybe define a new MSG_XYZ flag for this,
672+
which causes either of the two cases result in some recognizable error
673+
code returned rather than a 0.
674+
675+
**Use-Case:** Any code that wants to use `SOCK_SEQPACKET` and cannot
676+
effort disallowing zero sized datagrams from their protocol.
677+
678+
### Reasonable Handling of SELinux dropping SCM_RIGHTS fds
679+
680+
Currently, if SELinux refuses to let some file descriptor through, it
681+
will just drop them from the `SCM_RIGHTS` array. That's a terrible
682+
idea, since applications rely on the precise arrangement of the array
683+
to know which fd is which. By dropping entries silently, these apps
684+
will all break.
685+
686+
Idea how to improve things: leave the elements in the array in place,
687+
but return a marker instead (i.e. negative integer, maybe `-EPERM`) that
688+
tells userspace that there was an fd, but it was not allowed through.
689+
690+
**Use-Case:** Any code that wants to use `SCM_RIGHTS` properly.
691+
666692
---
667693

668694
## Finished Items

0 commit comments

Comments
 (0)