🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #6048

shared memory patch... Hole for trouble?

#6048
From: Michael Douglass
Date: Tue, 26 Mar 1996 00:00
33 lines
1614 bytes
Ok, while playng around with the semaphores for the shared memory patch
to nnrpd, I think I might have stumbled upon a hole for the memory
locking to become fubared...  Here is the segment of code:

    if (! shm_lock()) {
	return (NULL);
    }
#ifdef GROUP_SHARED
    if (! GRPvalid) {
        shm_unlock();
        if (! GetGroupList())
            return (NULL);
        if (! shm_lock())
            return (NULL);
        if (! GRPvalid)
            return (NULL);
    }
#endif


Notice here that if the group list is not valid, you unlock and call
GetGroupList which will attempt to read in the group list.  Now, 
after that returns TRUE, you lock the shared memory again.  You then
test to make sure that the group list is valid... If it is not, you
simply return NULL...  *LEAVING THE SEMAPHORE LOCKED*...

Am I right, or am I barking up the wrong tree?  Other experts in the
area like to shed some light on this topic?

Michael Douglass
Texas Networking, Inc.

Technical Details
Message-ID: <315881E1.2880@texas.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <315881E1.2880@texas.net>
Subject: shared memory patch... Hole for trouble?
Date: Tue, 26 Mar 1996 00:00:00 +0000
From: Michael Douglass <mikedoug@texas.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 144321303
Content-type: text/plain; charset=us-ascii
Organization: Texas Networking, Inc.
Mime-version: 1.0
Newsgroups: news.software.nntp
X-mailer: Mozilla 2.0 (X11; I; SunOS 5.5 sun4m)