develooper Front page | perl.perl5.porters | Postings from April 2000

[ID 20000405.012] t/op/groups.t assumes Solaris can't have groupnames with whitespace

From:
David Boyce
Date:
April 5, 2000 06:48
Subject:
[ID 20000405.012] t/op/groups.t assumes Solaris can't have groupnames with whitespace
Message ID:
200004051348.JAA19258@boyski.com

This is a bug report for perl from dsb@cleartool.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


-----------------------------------------------------------------
[Please enter your report here]

The 't/op/groups.t' test has code to deal specially with platforms
supporting groupnames containing whitespace but currently only enters
that code if $^O eq "uwin". Solaris (at last in 2.6 and above) has no
problem with such names but the test fails because it makes the
opposite assumption. The following patch fixed it at least on my
machine.

FWIW this comes up because I'm using Samba on Solaris as a domain
controller for some Windows boxes. In order for this to work right the
Solaris /etc/group files must define Windows-centric groups such as
"Domain Admins".

--- t/op/groups.t.5.6	Tue Apr  4 12:02:30 2000
+++ t/op/groups.t	Tue Apr  4 12:03:06 2000
@@ -115,7 +115,8 @@
     }
 } 
 
-if ($^O eq "uwin") { # Or anybody else who can have spaces in group names.
+if ($^O =~ /^(?:uwin|solaris)$/) {
+	# For platforms which support spaces in group names.
 	$gr1 = join(' ', grep(!$did{$_}++, sort split(' ', join(' ', @gr))));
 } else {
 	$gr1 = join(' ', sort @gr);

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.6.0:

Configured by dsb at Tue Apr  4 09:46:37 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos sparc5 5.7 generic_106541-07 sun4m sparc sunw,sparcstation-5 '
    config_args='-Dcc=gcc'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/data/home/dsb
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/data/home/dsb/bin:/usr/atria/bin:/usr/openwin/bin:/usr/local/bin:/usr/dt/bin:/usr/xpg4/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/local/samba/bin:/opt/netscape:/opt/Acrobat4:/data/home/dsb/Office51/bin
    PERLDB_OPTS=warnLevel=0
    PERL_BADLANG (unset)
    SHELL=/usr/bin/ksh



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About