From: Jarkko Hietaniemi Date: Wed, 15 Mar 2000 23:36:53 +0000 (+0000) Subject: Configure nits: do not use /tmp to avoid potential security X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52c7d5b6b4009e3325fa3282ea27e0f438de91f0;p=p5sagit%2Fp5-mst-13.2.git Configure nits: do not use /tmp to avoid potential security problems (Andy Dougherty: this does not fix the rampant use of /tmp by the various utilities like C compilers, though. Just don't run Configure as root if you care about security.), fix man3dir bug (both from Andy Dougherty); fix hints files not to use /tmp; retract #4993 (the description of the *symbols variables is okay, after all); regen Configure. p4raw-id: //depot/cfgperl@5757 --- diff --git a/Configure b/Configure index 0b3f8a1..9803dc7 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sun Mar 12 19:42:40 EET 2000 [metaconfig 3.0 PL70] +# Generated on Thu Mar 16 00:41:53 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <$first) 2>/dev/null; then if $test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else - if (echo hi >$second) 2>/dev/null; then - if $test -f /tmp/cf$$/123456789abcde; then - $cat <<'EOM' -That's peculiar... You can have filenames longer than 14 characters, but only -on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems -I shall consider your system cannot support long filenames at all. -EOM - val="$undef" - else - echo 'You can have filenames longer than 14 characters.' >&4 - val="$define" - fi - else - $cat <<'EOM' -How confusing! Some of your filesystems are sane enough to allow filenames -longer than 14 characters but some others like /tmp can't even think about them. -So, for now on, I shall assume your kernel does not allow them at all. -EOM - val="$undef" - fi + echo 'You can have filenames longer than 14 characters.'>&4 + val="$define" fi else $cat <<'EOM' -You can't have filenames longer than 14 chars. You can't even think about them! +You can't have filenames longer than 14 chars. +You can't even think about them! EOM val="$undef" fi set d_flexfnam eval $setvar -$rm -rf /tmp/cf$$ 123456789abcde* +$rm -rf 123456789abcde* : determine where library module manual pages go set man3dir man3dir none @@ -6688,7 +6668,7 @@ esac echo "If you don't want the manual sources installed, answer 'none'." prog=`echo $package | $sed 's/-*[0-9.]*$//'` case "$man3dir" in -'') dflt=`echo $man1dir | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` +'') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` if $test -d "$privlib/man/man3"; then cat <&4 @@ -6706,16 +6686,18 @@ EOM esac fi ;; -' ') dflt=none;; *) dflt="$man3dir" ;; esac +case "$dflt" in +' ') dflt=none ;; +esac echo " " fn=dn+~ rp="Where do the $package library man pages (source) go?" . ./getfile man3dir="$ans" man3direxp="$ansexp" -case "$man1dir" in +case "$man3dir" in '') man3dir=' ' installman3dir='';; esac diff --git a/Porting/Glossary b/Porting/Glossary index e00110c..e54cc9a 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -194,6 +194,8 @@ ccflags (ccflags.U): ccsymbols (Cppsym.U): The variable contains the symbols defined by the C compiler alone. + The symbols defined by cpp or by cc when it calls cpp are not in + this list, see cppsymbols and cppccsymbols. The list is a space-separated list of symbol=value tokens. cf_by (cf_who.U): @@ -267,9 +269,9 @@ cpp_stuff (cpp_stuff.U): used by the C preprocessor. cppccsymbols (Cppsym.U): - The variable contains the symbols defined by both - the bare C compiler and during a compilation that - includes stdio.h. + The variable contains the symbols defined by the C compiler + when it calls cpp. The symbols defined by the cc alone or cpp + alone are not in this list, see ccsymbols and cppsymbols. The list is a space-separated list of symbol=value tokens. cppflags (ccflags.U): @@ -301,8 +303,9 @@ cppstdin (cppstdin.U): preprocessor symbols. cppsymbols (Cppsym.U): - The variable contains the symbols during a compilation - that includes stdio.h. + The variable contains the symbols defined by the C preprocessor + alone. The symbols defined by cc or by cc when it calls cpp are + not in this list, see ccsymbols and cppccsymbols. The list is a space-separated list of symbol=value tokens. crosscompile (crosscompile.U): diff --git a/Porting/config.sh b/Porting/config.sh index 18e3506..924c7ae 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Mon Mar 6 00:00:30 EET 2000 +# Configuration time: Thu Mar 16 01:18:36 EET 2000 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -59,7 +59,7 @@ ccflags='-pthread -std -DLANGUAGE_C' ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Mon Mar 6 00:00:30 EET 2000' +cf_time='Thu Mar 16 01:18:36 EET 2000' charsize='1' chgrp='' chmod='' @@ -781,13 +781,13 @@ zcat='' zip='zip' # Configure command line arguments. config_arg0='Configure' -config_args='-Dprefix=/opt/perl -Doptimize=-O -Dusethreads -Duse64bitint -Duselfs -Dcf_by=yourname -Dcf_email=yourname@yourhost.yourplace.com -Dperladmin=yourname@yourhost.yourplace.com -Dmydomain=.yourplace.com -Dmyhostname=yourhost -dE' +config_args='-Dprefix=/opt/perl -Doptimize=-O -Dusethreads -Duse64bitint -Duselargefiles -Dcf_by=yourname -Dcf_email=yourname@yourhost.yourplace.com -Dperladmin=yourname@yourhost.yourplace.com -Dmydomain=.yourplace.com -Dmyhostname=yourhost -dE' config_argc=11 config_arg1='-Dprefix=/opt/perl' config_arg2='-Doptimize=-O' config_arg3='-Dusethreads' config_arg4='-Duse64bitint' -config_arg5='-Duselfs' +config_arg5='-Duselargefiles' config_arg6='-Dcf_by=yourname' config_arg7='-Dcf_email=yourname@yourhost.yourplace.com' config_arg8='-Dperladmin=yourname@yourhost.yourplace.com' diff --git a/Porting/config_H b/Porting/config_H index 7a63d00..88884c9 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Mon Mar 6 00:00:30 EET 2000 + * Configuration time: Thu Mar 16 01:18:36 EET 2000 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -175,12 +175,6 @@ */ #define HAS_FGETPOS /**/ -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#define FLEXFILENAMES /**/ - /* HAS_FLOCK: * This symbol, if defined, indicates that the flock routine is * available to do file locking. @@ -1398,6 +1392,12 @@ */ #define HAS_GETCWD /**/ +/* HAS_GETFSSTAT: + * This symbol, if defined, indicates that the getfsstat routine is + * available to stat filesystems in bulk. + */ +#define HAS_GETFSSTAT /**/ + /* HAS_GETGRENT: * This symbol, if defined, indicates that the getgrent routine is * available for sequential access of the group database. @@ -1624,13 +1624,6 @@ */ #define HAS_ISASCII /**/ -/* HAS_LCHOWN: - * This symbol, if defined, indicates that the lchown routine is - * available to operate on a symbolic link (instead of following the - * link). - */ -#define HAS_LCHOWN /**/ - /* HAS_LDBL_DIG: * This symbol, if defined, indicates that this system's * or defines the symbol LDBL_DIG, which is the number @@ -1666,6 +1659,14 @@ #define LONGLONGSIZE 8 /**/ #endif +/* HAS_LSEEK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the lseek() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern off_t lseek(int, off_t, int); + */ +#define HAS_LSEEK_PROTO /**/ + /* HAS_MADVISE: * This symbol, if defined, indicates that the madvise system call is * available to map a file into memory. @@ -2260,6 +2261,12 @@ */ #define I_ICONV /**/ +/* I_IEEEFP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_IEEEFP / **/ + /* I_INTTYPES: * This symbol, if defined, indicates to the C program that it should * include . @@ -2813,6 +2820,12 @@ */ #define Size_t size_t /* length paramater for string functions */ +/* Sock_size_t: + * This symbol holds the type used for the size argument of + * various socket calls (just the base type, not the pointer-to). + */ +#define Sock_size_t int /**/ + /* SSize_t: * This symbol holds the type used by functions that return * a count of bytes or an error condition. It must be a signed type. @@ -2952,10 +2965,22 @@ #endif /*#define OLD_PTHREADS_API / **/ +/* PERL_VENDORARCH: + * If defined, this symbol contains the name of a private library. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. + * It may have a ~ on the front. + * The standard distribution will put nothing in this directory. + * Vendors who distribute perl may wish to place their own + * architecture-dependent modules and extensions in this directory with + * MakeMaker Makefile.PL INSTALLDIRS=vendor + * or equivalent. See INSTALL for details. + */ /* PERL_VENDORARCH_EXP: * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/*#define PERL_VENDORARCH "" / **/ /*#define PERL_VENDORARCH_EXP "" / **/ /* PERL_VENDORLIB_EXP: @@ -3030,30 +3055,17 @@ #define PERL_XS_APIVERSION "5.6.0" #define PERL_PM_APIVERSION "5.005" -/* HAS_GETFSSTAT: - * This symbol, if defined, indicates that the getfsstat routine is - * available to stat filesystems in bulk. - */ -#define HAS_GETFSSTAT /**/ - -/* I_IEEEFP: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_IEEEFP / **/ - -/* HAS_LSEEK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the lseek() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern off_t lseek(int, off_t, int); +/* HAS_LCHOWN: + * This symbol, if defined, indicates that the lchown routine is + * available to operate on a symbolic link (instead of following the + * link). */ -#define HAS_LSEEK_PROTO /**/ +#define HAS_LCHOWN /**/ -/* Sock_size_t: - * This symbol holds the type used for the size argument of - * various socket calls (just the base type, not the pointer-to). +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. */ -#define Sock_size_t int /**/ +#define FLEXFILENAMES /**/ #endif diff --git a/config_h.SH b/config_h.SH index 108b673..df6801b 100644 --- a/config_h.SH +++ b/config_h.SH @@ -189,12 +189,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_fgetpos HAS_FGETPOS /**/ -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#$d_flexfnam FLEXFILENAMES /**/ - /* HAS_FLOCK: * This symbol, if defined, indicates that the flock routine is * available to do file locking. @@ -3082,5 +3076,11 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_lchown HAS_LCHOWN /**/ +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. + */ +#$d_flexfnam FLEXFILENAMES /**/ + #endif !GROK!THIS! diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index c149ae07..cba8db2 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -68,7 +68,7 @@ case "`$cc -v 2>&1 | grep cc`" in *gcc*) ;; # pass *) # compile something small: taint.c is fine for this. # the main point is the '-v' flag of 'cc'. - case "`cc -v -I. -c taint.c -o /tmp/taint$$.o 2>&1`" in + case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC _DEC_cc_style=new ;; @@ -77,7 +77,7 @@ case "`$cc -v 2>&1 | grep cc`" in ;; esac # cleanup - rm -f /tmp/taint$$.o + rm -f taint$$.o ;; esac diff --git a/hints/esix4.sh b/hints/esix4.sh index 9967207..b1d697c 100644 --- a/hints/esix4.sh +++ b/hints/esix4.sh @@ -21,8 +21,8 @@ d_suidsafe=define usevfork='false' if test "$osvers" = "3.0"; then d_gconvert='undef' - grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >/tmp/esix$$ - if test -s /tmp/esix$$; then + grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >esix$$ + if test -s esix$$; then cat <&2 WARNING: You are likely to have problems compiling the Socket extension @@ -31,6 +31,6 @@ unless you fix the unterminated comment for AF_OSI in the file EOM fi - rm -f /tmp/esix$$ + rm -f esix$$ fi diff --git a/hints/newsos4.sh b/hints/newsos4.sh index a33cb31..3e447a5 100644 --- a/hints/newsos4.sh +++ b/hints/newsos4.sh @@ -6,11 +6,10 @@ echo echo 'Compiling Tips:' echo 'When you have found that ld complains "multiple defined" error' echo 'on linking /lib/libdbm.a, do following instructions.' -echo ' cd /tmp (working on /tmp)' echo ' cp /lib/libdbm.a dbm.o (copy current libdbm.a)' echo ' ar cr libdbm.a dbm.o (make archive)' echo ' mv /lib/libdbm.a /lib/libdbm.a.backup (backup original library)' -echo ' cp /tmp/libdbm.a /lib (copy newer one)' +echo ' cp libdbm.a /lib (copy newer one)' echo ' ranlib /lib/libdbm.a (ranlib for later use)' echo