Skip to content

Commit

Permalink
Merge pull request #584 from CasualPokePlayer/revert_28e4eee1
Browse files Browse the repository at this point in the history
Revert "add another whitelist for INET connections"
  • Loading branch information
clementgallet authored Oct 22, 2023
2 parents 4c8899e + f986cee commit ed069a5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/library/socketwrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ DEFINE_ORIG_POINTER(socket)

/* Deny internet access */
if (domain == AF_INET || domain == AF_INET6) {
/* HACK: ALSA might use PulseAudio for host audio playback, for e.g. WSL.
* PulseAudio might then proceed to call socket with AF_INET on a new thread
* We need to allow this connection, otherwise ALSA init will fail.
* We also can't mark PulseAudio's thread with pthread_setname_np,
* as PulseAudio will bypass that with prctl (a variadic function!) */
char thread_name[16];
if (pthread_getname_np(pthread_self(), thread_name, sizeof(thread_name)) == 0) {
if (strcmp(thread_name, "threaded-ml") == 0) {
return orig::socket(domain, type, protocol);
}
}

if (!(Global::shared_config.debug_state & SharedConfig::DEBUG_NATIVE_INET)) {
errno = EACCES;
return -1;
Expand Down

0 comments on commit ed069a5

Please sign in to comment.