Skip to content

Conversation

@datadiode
Copy link
Contributor

The proposed change makes file descriptors created through posix_open() distinguishable from sockets by having them take odd values only.

…n() distinguishable from sockets by having them take odd values only
@busterb
Copy link
Contributor

busterb commented Oct 8, 2024

Hi @datadiode, interesting solution. How does this work when the file descriptors are passed in by the calling program or library though?

@datadiode
Copy link
Contributor Author

You mean if they mean to pass a file descriptor to e.g. SSL_set_fd()?
I never needed to, but I guess they could oddify it in the same way on their side to produce a file descriptor which LibreSSL can distinguish from a socket.

@busterb
Copy link
Contributor

busterb commented Oct 14, 2024

I finally got a chance to test this out. It seems to break console IO when using openssl.exe. As soon as there is console IO, the program exits:
image

@busterb busterb mentioned this pull request Apr 12, 2025
@busterb
Copy link
Contributor

busterb commented Apr 16, 2025

Closing this out since the patches here were cherry picked into #1150

@busterb busterb closed this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants