Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Yow! Is this sexual intercourse yet?? Is it, huh, is it??


dovenet / Synchronet Programming / src/sbbs3/main.cpp

SubjectAuthor
o src/sbbs3/main.cppDeuc?

1
src/sbbs3/main.cpp

<65E0E12B.49119.syncprog@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=3138&group=DOVE-Net.Synchronet_Programming#3138

  copy link   Newsgroups: DOVE-Net.Synchronet_Programming
From: deuc?@VERT (Deuc?)
To: Git commit to main/sbbs/master
Subject: src/sbbs3/main.cpp
Message-ID: <65E0E12B.49119.syncprog@vert.synchro.net>
Date: Thu, 29 Feb 2024 11:55:23 -0800
X-Comment-To: Git commit to main/sbbs/master
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Programming
X-FTN-PID: Synchronet 3.20a-Linux master/3000ece51 Feb 24 2024 GCC 12.2.0
X-FTN-MSGID: 49119.syncprog@1:103/705 2a46d70a
X-FTN-CHRS: UTF-8 4
WhenImported: 20240229115523-0800 41e0
WhenExported: 20240303164636-0800 41e0
ExportedFrom: VERT syncprog 49119
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
 by: Deuc? - Thu, 29 Feb 2024 19:55 UTC

https://gitlab.synchro.net/main/sbbs/-/commit/346849ac253a08374b9bfca0
Modified Files:
src/sbbs3/main.cpp
Log Message:
Unlock ssh_mutex before calling sftps_recv()

This should fix the sftp hangs...
While FreeBSD will return EDEADLOCK when a mutex would deadlock,
Linux will do what I ask and deadlock.

Since we're not checking the return value of pthread_mutex_lock(),
this would go completely unnoticed on FreeBSD, resulting in the
mutex being unlocked early and all sorts of unprotected accesses
would happen, potentially doing crazy things. On Linux it just
deadlocks, and taking a peek at the thread backtraces makes the
problem obvious.

So, point to Linux for making life more correct for people who
do incorrect things (locking without checking the return value).

I'd also like to thank nelgin, for sticking with me on this issue
and being my gdb puppet.

And really, this commit should be shared by all the contributors
who... ����

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor