Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site linus.UUCP
Path: utzoo!linus!sch
From: sch@linus.UUCP (Stephen C. Hemminger)
Newsgroups: net.bugs.uucp
Subject: access() bug in gnxseq.c
Message-ID: <118@linus.UUCP>
Date: Thu, 21-Jul-83 16:34:53 EDT
Article-I.D.: linus.118
Posted: Thu Jul 21 16:34:53 1983
Date-Received: Thu, 21-Jul-83 22:11:46 EDT
Organization: MITRE Corp., Bedford MA
Lines: 31

Not previously reported bug in 4.1Bsd uucp, don't know about others.

The function cmtseq() in file gnxseq.c calls the access syscall
with a bogus argument of 0400 , access takes an argument in range
0-7.  It looks like author meant to check if mode == 0400, in which
case substitute access(SQTMP, 04)

***** Old code fragment ***
cmtseq()
{
	int ret;

	if ((ret = access(SQTMP, 0400)) != 0) {
		rmlock(SQLOCK);
		return(0);
	}
...
***** New code fragment ***
cmtseq()
{
	int ret;

	if ((ret = access(SQTMP, 4)) != 0) {
		rmlock(SQLOCK);
		return(0);
	}
...
-- 
Stephen Hemminger,  Mitre Corp. Bedford MA 
	{allegra,genrad,ihnp4, utzoo}!linus!sch	(UUCP)
	linus!sch@mitre-bedford			(ARPA)