Date: Tue, 10 Mar 1998 23:26:20 +0100 From: Ollivier Robert <roberto@keltia.freenix.fr> To: cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/gnu/usr.bin/perl/perl perl.c Message-ID: <19980310232620.A6489@keltia.freenix.fr> In-Reply-To: =?iso-8859-1?Q?=3C19980310230034=2E40398=40nagual=2Epp=2Eru=3E=3B_from_?= =?iso-8859-1?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7_on_Tue=2C_Mar_10=2C?= =?iso-8859-1?Q?_1998_at_11=3A00=3A34PM_%2B0300?= References: <199803101943.LAA05883@freefall.freebsd.org> <19980310230034.40398@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
According to Андрей Чернов:
> Similar patch is needed for perl5 port too.
Here it is:
--- perl.c.old Tue Oct 14 20:09:18 1997
+++ perl.c Tue Mar 10 23:19:37 1998
@@ -588,13 +588,15 @@
if (euid != uid || egid != gid)
croak("No -e allowed in setuid scripts");
if (!e_fp) {
+ int e_fd;
+
e_tmpname = savepv(TMPPATH);
- (void)mktemp(e_tmpname);
- if (!*e_tmpname)
- croak("Can't mktemp()");
- e_fp = PerlIO_open(e_tmpname,"w");
+ e_fd = mkstemp(e_tmpname);
+ if (e_fd == EOF)
+ croak("Can't mkstemp()");
+ e_fp = PerlIO_fdopen(e_fd,"w");
if (!e_fp)
- croak("Cannot open temporary file");
+ croak("Cannot fdopen temporary file");
}
if (*++s)
PerlIO_puts(e_fp,s);
It is not suitable for official inclusion in Perl because one will have to
test for mkstemp(3) in Configure but it should be enough for the port.
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #0: Sun Mar 1 18:50:39 CET 1998
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?19980310232620.A6489>
