diff options
author | Larry Wall <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
---|---|---|
committer | Larry <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
commit | 4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch) | |
tree | 37ebeb26a64f123784fd8fac6243b124767243b0 /mg.c | |
parent | 8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff) | |
download | perl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz |
5.002 beta 1
If you're adventurous, have a look at
ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz
Many thanks to Andy for doing the integration.
Obviously, if you consult the bugs database, you'll note there are
still plenty of buglets that need fixing, and several enhancements that
I've intended to put in still haven't made it in (Hi, Tim and Ilya).
But I think it'll be pretty stable. And you can start to fiddle around
with prototypes (which are, of course, still totally undocumented).
Packrats, don't worry too much about readvertising this widely.
Nowadays we're on a T1 here, so our bandwidth is okay.
Have the appropriate amount of jollity.
Larry
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 26 |
1 files changed, 10 insertions, 16 deletions
@@ -80,6 +80,7 @@ SV* sv; U32 savemagic = SvMAGICAL(sv); SvMAGICAL_off(sv); + SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; for (mg = SvMAGIC(sv); mg; mg = nextmg) { MGVTBL* vtbl = mg->mg_virtual; @@ -550,6 +551,10 @@ MAGIC* mg; else croak("No such hook: %s", s); i = 0; + if (*svp) { + SvREFCNT_dec(*svp); + *svp = 0; + } } else { i = whichsig(s); /* ...no, a brick */ @@ -1093,7 +1098,7 @@ MAGIC* mg; #endif #endif uid = (I32)getuid(); - tainting |= (euid != uid || egid != gid); + tainting |= (uid && (euid != uid || egid != gid)); break; case '>': euid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv); @@ -1120,7 +1125,7 @@ MAGIC* mg; #endif #endif euid = (I32)geteuid(); - tainting |= (euid != uid || egid != gid); + tainting |= (uid && (euid != uid || egid != gid)); break; case '(': gid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv); @@ -1147,7 +1152,7 @@ MAGIC* mg; #endif #endif gid = (I32)getgid(); - tainting |= (euid != uid || egid != gid); + tainting |= (uid && (euid != uid || egid != gid)); break; case ')': egid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv); @@ -1174,7 +1179,7 @@ MAGIC* mg; #endif #endif egid = (I32)getegid(); - tainting |= (euid != uid || egid != gid); + tainting |= (uid && (euid != uid || egid != gid)); break; case ':': chopset = SvPV_force(sv,na); @@ -1240,17 +1245,6 @@ char *sig; return 0; } -char * -whichsigname(sig) -int sig; -{ - register int i; - for (i = 1; sig_num[i]; i++) /* sig_num[] is a 0-terminated list */ - if (sig_num[i] == sig) - return sig_name[i]; - return Nullch; -} - Signal_t sighandler(sig) int sig; @@ -1267,7 +1261,7 @@ int sig; signal(sig, SIG_ACK); #endif - signame = whichsigname(sig); + signame = sig_name[sig]; cv = sv_2cv(*hv_fetch(GvHVn(siggv),signame,strlen(signame), TRUE), &st, &gv, TRUE); |