obj = newSVrv(obj_ref, class);
sv_setiv(obj, (IV)thread);
SvREADONLY_on(obj);
-
+ PerlIO_flush((PerlIO*)NULL);
current_perl = PERL_GET_CONTEXT;
/*
# eleminate DNS lookups
return $fqdn = $host . "." . $domain
- if($host !~ /\./ && $domain =~ /\./);
+ if(defined $host && defined $domain &&
+ $host !~ /\./ && $domain =~ /\./);
# For hosts that have no name, just an IP address
- return $fqdn = $host if $host =~ /^\d+(\.\d+){3}$/;
+ return $fqdn = $host if defined $host && $host =~ /^\d+(\.\d+){3}$/;
- my @host = split(/\./, $host);
- my @domain = split(/\./, $domain);
+ my @host = defined $host ? split(/\./, $host) : ('localhost');
+ my @domain = defined $domain ? split(/\./, $domain) : ();
my @fqdn = ();
# Determine from @host & @domain the FQDN
### You may have to set your dynamic library search path,
### $Config{ldlibpthname}, to point to the build directory
### before running the harness-- depending on your shell style:
- ### setenv $Config{ldlibpthname} `pwd`; cd t; ./perl harness
- ### $Config{ldlibpthname}=`pwd`; export $Config{ldlibpthname}; cd t; ./perl harness
- ### export $Config{ldlibpthname}=`pwd`; cd t; ./perl harness
+ ### setenv $Config{ldlibpthname} `pwd`:$Config{ldlibpthname}; cd t; ./perl harness
+ ### $Config{ldlibpthname}=`pwd`:$Config{ldlibpthname}; export $Config{ldlibpthname}; cd t; ./perl harness
+ ### export $Config{ldlibpthname}=`pwd`:$Config{ldlibpthname}; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
SHRDLU
exit 0;
}
+chomp($groups);
+
+print "# groups = $groups\n";
+
# Remember that group names can contain whitespace, '-', et cetera.
# That is: do not \w, do not \S.
if ($groups =~ /groups=(.+)( [ug]id=|$)/) {
}
$seen{$pwgid}++;
+print "# pwgid = $pwgid, pwgnam = $pwgnam\n";
+
for (split(' ', $()) {
next if $seen{$_}++;
($group) = getgrgid($_);
}
}
+print "# gr = @gr\n";
+
if ($^O =~ /^(?:uwin|solaris)$/) {
# Or anybody else who can have spaces in group names.
$gr1 = join(' ', grep(!$did{$_}++, sort split(' ', join(' ', @gr))));
$gr2 = join(' ', grep(!$basegroup{$_}++, sort split(' ',$groups)));
-if ($gr1 eq $gr2) {
+if ($gr1 eq $gr2 || ($gr1 eq '' && $gr2 eq $pwgid)) {
print "ok 1\n";
}
else {