Front page | perl.perl5.porters |
Postings from November 2003
[perl #24521] make test breaks permissions on /dev/tty
Thread Next
From:
perlbug-followup
Date:
November 18, 2003 19:56
Subject:
[perl #24521] make test breaks permissions on /dev/tty
Message ID:
rt-24521-67609.16.5713675276819@rt.perl.org
# New Ticket Created by menscher+bug@uiuc.edu
# Please include the string: [perl #24521]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24521 >
This is a bug report for perl from menscher+bug@uiuc.edu,
generated with the help of perlbug 1.34 running under perl v5.8.2.
-----------------------------------------------------------------
[Please enter your report here]
When running "make test" from the perl source tree, the permissions
of /dev/tty get changed from 0666 to 2775. This obviously breaks
a unix system pretty badly.
I've traced the problem to one of the tests performed in
${PERL_582_SOURCE}/t/lib/warnings/doio
The specific test that is breaking things is Perl_nextargv.
When this program gets called with a file redirected into it
(the Makefile runs "./perl TEST </dev/tty", and I think the
/dev/tty is passed through the testing procedure), it changes
that file's permissions from 0666 to 2775 (if run as root) or to
2755 (if run as a user).
I'm a complete novice, so hopefully this is enough for you to
understand the problem. If not, maybe this code segment (taken
from the doio test procedure) will be easier to understand:
---snip---
#!/usr/local/bin/perl
$^W = 0 ;
my $filename = "./temp.dir" ;
mkdir $filename, 0777
or die "Cannot create directory $filename: $!\n" ;
system("chmod 666 blah");
print("permissions reset to:\n");
system("ls -l blah");
{
local (@ARGV) = ($filename) ;
local ($^I) = "" ;
my $x = <> ;
}
system("ls -l blah");
system("chmod 666 blah");
print("permissions reset to:\n");
system("ls -l blah");
{
local (@ARGV) = ($filename) ;
local ($^I) = "" ;
my $x = <> ;
}
system("ls -l blah");
rmdir $filename ;
---snip---
Save that as bug.py and do:
$ touch blah
$ ./bug.py <blah
It will hopefully then be evident what the problem is.
We have seen this on three machines (RH7.3 and RH9). I've also
confirmed that this test program changes permissions with perl-5.6.1
under IRIX 6.5.21m. So perhaps the program is working as intended,
and it's just the "make test" script that's broken?
I'm marking it critical since it has the potential to break a Unix
machine in a very bad (and hard to track down!) way.
Damian Menscher
--
-=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
-=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
-=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
-=#| <menscher@uiuc.edu> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=install
severity=critical
---
Site configuration information for perl v5.8.2:
Configured by weber at Mon Nov 17 17:52:19 CST 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=linux, osvers=2.4.20-20.7smp, archname=i686-linux-thread-multi
uname='linux zeus.itg.uiuc.edu 2.4.20-20.7smp #1 smp mon aug 18 14:46:14 edt 2003 i686 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-113)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.2:
/usr/local/encap/perl-5.8.2/lib/5.8.2/i686-linux-thread-multi
/usr/local/encap/perl-5.8.2/lib/5.8.2
/usr/local/encap/perl-5.8.2/lib/site_perl/5.8.2/i686-linux-thread-multi
/usr/local/encap/perl-5.8.2/lib/site_perl/5.8.2
/usr/local/encap/perl-5.8.2/lib/site_perl
.
---
Environment for perl v5.8.2:
HOME=/home/staff/menscher
LANG=en_US.iso885915
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:.
LOGDIR (unset)
PATH=/bin:/usr/etc:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/bsd:/usr/ucb:/usr/opt/freeware/bin:/etc:/usr/local/bin:/usr/local/sbin:/usr/java/jdk1.3.0_02/bin:/usr/java/bin:.:/usr/java/j2sdk1.4.0_01/bin:/sbin
PERL_BADLANG (unset)
SHELL=/bin/tcsh
Thread Next
-
[perl #24521] make test breaks permissions on /dev/tty
by perlbug-followup