*BSD News Article 18520


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!pipex!uknet!mcsun!sun4nl!hacktic!not-for-mail
From: cor@hacktic.nl (Cor)
Newsgroups: comp.os.386bsd.questions
Subject: nn
Date: 16 Jul 1993 19:58:18 +0200
Organization: Hack-Tic, networking for the masses
Lines: 27
Message-ID: <226q88INN56k@xs4all.hacktic.nl>
NNTP-Posting-Host: xs4all.hacktic.nl

Im not sure this is a bug or not, so id better ask first.
Im setting up nn using nntp to get and post articles from another
386bsd host which acts as a news server.
It all works. :) But! After each message I post I get an email
from the newssystem saying:


warning: this program uses gets(), which is unsafe.


I tracked this to the gets() function in /usr/src/lib/libc/stdio/gets.c
which prints this message to stderr. 
This is kinda...no..really annoying. I guess what happens is..
when nn tries to post the message using nntp, it checks stderr
notices the message (coming from gets(), not inn or nn itself!!) and
emails this error to the user. What I did was just copy gets.c to the
nn directory and link it with nn removing the stderr message.
That solved this particular problem, but I can imagine more programs
suffer from this. 
Is there a more elegant method? Do we really need this message in gets.c?

cor
-- 
| cor@hacktic.nl | Hack-Tic System Management | +31-20-6001480-3 (VMB)  |
| -------------------------------------------------------------------------|
|   ######### Signature Virus Running. Contamination Complete #########    |
+--------------------------------------------------------------------------+