Date: 04 Jan 2001 17:14:01 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: Mark Murray <mark@grondar.za> Cc: Paul Richards <paul@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/update pkg_update.pl Message-ID: <xzp3dezl2gm.fsf@flood.ping.uio.no> In-Reply-To: Mark Murray's message of "Thu, 04 Jan 2001 17:09:43 %2B0200" References: <xzp8zorla59.fsf@flood.ping.uio.no> <200101041509.f04F9kY06526@gratis.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray <mark@grondar.za> writes: > > > $file not be what you expect, particularly should $file turn out to be > > > "+REQUIRES" since ">+" is a valid open mode. > > This would not be a problem if you used sysopen() instead of open(). > Even better - properly sanitise $file using taint-like checking. This is a crutch, not a cure. The fundamental problem here is that open() mixes information about the type of operation to perform with the name of the file on which to perform that operation - which is very poor API design. My advice is to use sysopen() consistently except for these two cases: open(PIPE, "-|") and open(PIPE, "|-"). DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp3dezl2gm.fsf>