🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.notes
Article #68

Bug Fix for checknotes.c 1.7.0.1

#68
From: cmv
Date: Mon, 06 Apr 1987 16:30
55 lines
2515 bytes
We have a bug in version 1.7.0.1 of checknotes.c that recently became apparent
and thought we should post the fix to netnews.

If their exists some private notes on the system, and someone without
permission on that private note tries to use checknotes on it, checknotes will
still work properly. This becomes a pain when everyone uses the default notes
sequencer list (which includes private notesfiles) because when they do an
autoseq and read all the notes they are allowed to, checknotes still insists
they have unread notes!

The fix for this problem is a one liner in 2 files: checknotes.c and Makefile.
Here are the fixes:

checknotes.c

---Original---
80  *      Do it the hard way -- open the notesfile and read the descriptor
81  */
82     if (opennf (&io, nfname) < 0)
83         return 0;                                       /* ignore this one */
84     getdscr (&io, &io.descr);

---Modified---
80  *      Do it the hard way -- open the notesfile and read the descriptor
81  */
82     /* Allow check added by cmv 4/87 */
83     if ((opennf (&io, nfname) < 0) || (allow(&io,READOK) != 0))
          ^                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84         return 0;                                       /* ignore this one */
85     getdscr (&io, &io.descr);


Makefile

---Original---
85 CHECKNOTES = check.o cursor.o gname.o gtime.o lrsp.o misc.o miscio.o \
86         next.o pattern.o perms.o recsio.o startup.o times.o expand.o

---Modified---
85  CHECKNOTES = check.o cursor.o gname.o gtime.o lrsp.o misc.o miscio.o \
86         next.o pattern.o permit.o perms.o recsio.o startup.o times.o expand.o
                            ^^^^^^^^^


By the way, this is the latest version of notesfiles copied over from uiucdcs
on 3/20/87. Feel free to mail questions/comments etc. to:

Craig Votava
AT&T Bell Labs, Naperville IL.
IH 4G-324 312/979-2542

ihnp4!ihlpm!cmv
ihnp4!ih3b1!cmv
ihnp4!ihuxz!cmv
Technical Details
Message-ID: <1988@ihuxz.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ihuxz!cmv

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ihuxz!cmv
From: cmv@ihuxz.UUCP
Newsgroups: news.software.notes
Subject: Bug Fix for checknotes.c 1.7.0.1
Message-ID: <1988@ihuxz.ATT.COM>
Date: Mon, 6-Apr-87 11:30:50 EST
Article-I.D.: ihuxz.1988
Posted: Mon Apr  6 11:30:50 1987
Date-Received: Thu, 9-Apr-87 00:16:43 EST
Reply-To: cmv@ihuxz.UUCP (Craig Votava)
Distribution: world
Organization: AT&T Bell Laboratories
Lines: 55
Keywords: notes bug checknotes