Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Sep 1998 03:10:40 -0300 (EST)
From:      Joao Carlos Mendes Luis <jonny@jonny.eng.br>
To:        wes@softweyr.com (Wes Peters)
Cc:        jonny@jonny.eng.br, lva@dds.nl, freebsd-isp@FreeBSD.ORG, freebsd-security@FreeBSD.ORG
Subject:   Re: small LDA c program requested
Message-ID:  <199809060610.DAA01265@roma.coe.ufrj.br>
In-Reply-To: <35F2248F.87CE70FC@softweyr.com> from Wes Peters at "Sep 5, 98 11:58:39 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
#define quoting(Wes Peters)
// > Shouldn't you lock the file ?  O_APPEND is only good for atomic
// > writes, IIRC.
// 
// You're right.  A quick fix would be to open the file with O_EXLOCK
// and puke if the filesystem doesn't support locking; this would rule
// out NFS-mounted mailboxes.

Which should not be used anyway, at least with the current
implementation in FreeBSD.  I've already lost lots of email
by reading it over NFS.  Now I just ssh the mail server and
call elm from there.

// It would be better, IMHO, to collect the entire input and write it in a 
// single call, but this might get expensive in terms of memory allocation.  
// You could do it by allocating a number of large, fixed-size buffers and 
// using writev for output, but what about some bonehead who mails a 40 Meg 
// "Word" document?

Users are always ahead of managers in terms of finding new problems  :)

But I'm not sure.  Wouldn't NFS break the write in smaller ones ?
Is there such atomic write in NFS, even for VERY large blocks ?

					Jonny

--
Joao Carlos Mendes Luis            M.Sc. Student
jonny@jonny.eng.br                 Universidade Federal do Rio de Janeiro
"There are two major products that come out of Berkeley: LSD and Unix.
 We don't believe this to be a coincidence." -- Jeremy  S. Anderson

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809060610.DAA01265>