[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] locking, again



On Mon, Nov 20, 2000 at 10:40:30AM +0100, Cornelius Krasel wrote:
> The groupinfo file contains numbers for the first and last article in
> a newsgroup. These numbers are verified by texpire and fetchnews and
> are needed by fetchnews and the nntpd. fetchnews needs to know the
> last number of an article when it sorts new articles into the spool
> to rise the article number properly. The nntpd needs to know the last
> number to give proper replies to GROUP commands.
> 
> If the nntpd would not write the groupinfo file, it would still know
> the last number because it stores it internally. 

What guarantees you that nobody starts a 2nd nntpd that reports
wrong low/high marks? New articles would not be visible for
anybody but the poster until a fetchnews/texpire. This would turn
leafnode into a strict single user server. Moreover, it will
render any mail2news mechanism useless if you have to run
fetchnews to update *local* groups.

> 2) We can abolish the file locking based on fcntl(). This would make
>    it possible to implement NFS-secure file locking by using open()

If the NFS doesn't support fcntl() it's broken. fcntl() is POSIX.
If something doesn't even fulfill the simple demands of POSIX it
is horribly broken and I don't see why leafnode should work
around crappy software.

> 3) Locking would be again more "safe".

Locking is safe if you follow the simple guideline not to unlink
anything that doen't belong to you.

Regards,
	Jo:rg

-- 
Fortune cookie of the day:
About the only thing on a farm that has an easy time is the dog.

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list