This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Removed the ifdefs for INCOMPLETE_TAINTS
authorBrian Fraser <fraserbn@gmail.com>
Fri, 6 Sep 2013 01:05:38 +0000 (22:05 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sat, 21 Sep 2013 11:47:42 +0000 (08:47 -0300)
This was added in 5.5/5.6 as a backwards-compatibility measure
when taint was extended to happen in more places.

cygwin/cygwin.c
dist/Cwd/Cwd.pm
dist/Cwd/Cwd.xs
djgpp/djgpp.c
doio.c
os2/os2.c
pp_ctl.c
pp_sys.c
util.c
win32/wince.c

index e7be5e3..6b31232 100644 (file)
@@ -199,9 +199,7 @@ XS(Cygwin_cwd)
     if((cwd = getcwd(NULL, -1))) {
        ST(0) = sv_2mortal(newSVpv(cwd, 0));
        free(cwd);
-#ifndef INCOMPLETE_TAINTS
        SvTAINTED_on(ST(0));
-#endif
        XSRETURN(1);
     }
     XSRETURN_UNDEF;
index bd19ea7..d9de63c 100644 (file)
@@ -171,7 +171,7 @@ use strict;
 use Exporter;
 use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 
-$VERSION = '3.44';
+$VERSION = '3.45';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//;
 
index dc3da18..4ddbdac 100644 (file)
@@ -251,9 +251,7 @@ int Perl_getcwd_sv(pTHX_ SV *sv)
 {
 #ifndef PERL_MICRO
 
-#ifndef INCOMPLETE_TAINTS
     SvTAINTED_on(sv);
-#endif
 
 #ifdef HAS_GETCWD
     {
@@ -551,9 +549,7 @@ PPCODE:
        croak_xs_usage(cv,  "");
     getcwd_sv(TARG);
     XSprePUSH; PUSHTARG;
-#ifndef INCOMPLETE_TAINTS
     SvTAINTED_on(TARG);
-#endif
 }
 
 void
@@ -580,9 +576,7 @@ PPCODE:
         sv_setsv(TARG, &PL_sv_undef);
 
     XSprePUSH; PUSHs(TARG);
-#ifndef INCOMPLETE_TAINTS
     SvTAINTED_on(TARG);
-#endif
 }
 
 #if defined(WIN32) && !defined(UNDER_CE)
@@ -617,9 +611,7 @@ PPCODE:
     Safefree(dir);
 
     XSprePUSH; PUSHs(TARG);
-#ifndef INCOMPLETE_TAINTS
     SvTAINTED_on(TARG);
-#endif
 }
 
 #endif
index 9370a29..6d136e3 100644 (file)
@@ -352,9 +352,7 @@ XS(dos_GetCwd)
         ST(0)=sv_newmortal ();
         if (getcwd (tmp,PATH_MAX+1)!=NULL)
             sv_setpv ((SV*)ST(0),tmp);
-#ifndef INCOMPLETE_TAINTS
        SvTAINTED_on(ST(0));
-#endif
     }
     XSRETURN (1);
 }
@@ -377,9 +375,7 @@ XS(XS_Cwd_sys_cwd)
        RETVAL = getcwd(p, MAXPATHLEN);
        ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
-#ifndef INCOMPLETE_TAINTS
        SvTAINTED_on(ST(0));
-#endif
     }
     XSRETURN(1);
 }
diff --git a/doio.c b/doio.c
index 5223654..50ab24f 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -2219,10 +2219,8 @@ Perl_do_msgrcv(pTHX_ SV **mark, SV **sp)
     if (ret >= 0) {
        SvCUR_set(mstr, sizeof(long)+ret);
        *SvEND(mstr) = '\0';
-#ifndef INCOMPLETE_TAINTS
        /* who knows who has been playing with this message? */
        SvTAINTED_on(mstr);
-#endif
     }
     return ret;
 #else
@@ -2329,10 +2327,8 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
        SvCUR_set(mstr, msize);
        *SvEND(mstr) = '\0';
        SvSETMAGIC(mstr);
-#ifndef INCOMPLETE_TAINTS
        /* who knows who has been playing with this shared memory? */
        SvTAINTED_on(mstr);
-#endif
     }
     else {
        STRLEN len;
index 574c5fc..94b4541 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -3461,9 +3461,7 @@ XS(XS_Cwd_sys_cwd)
        RETVAL = _getcwd2(p, MAXPATHLEN);
        ST(0) = sv_newmortal();
        sv_setpv(ST(0), RETVAL);
-#ifndef INCOMPLETE_TAINTS
        SvTAINTED_on(ST(0));
-#endif
     }
     XSRETURN(1);
 }
@@ -3595,10 +3593,8 @@ XS(XS_Cwd_sys_abspath)
            *t = 0;
            SvCUR_set(sv, t - SvPVX(sv));
        }
-#ifndef INCOMPLETE_TAINTS
        if (!items)
            SvTAINTED_on(ST(0));
-#endif
     }
     XSRETURN(1);
 }
index 63482fd..f258976 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -168,12 +168,10 @@ PP(pp_regcomp)
     }
 
 
-#ifndef INCOMPLETE_TAINTS
     if (TAINTING_get && TAINT_get) {
        SvTAINTED_on((SV*)new_re);
         RX_TAINT_on(new_re);
     }
-#endif
 
 #if !defined(USE_ITHREADS)
     /* can't change the optree at runtime either */
index 8e09e73..5656e5a 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3610,9 +3610,7 @@ PP(pp_readlink)
     char buf[MAXPATHLEN];
     int len;
 
-#ifndef INCOMPLETE_TAINTS
     TAINT;
-#endif
     tmps = POPpconstx;
     len = readlink(tmps, buf, sizeof(buf) - 1);
     if (len < 0)
@@ -3841,10 +3839,8 @@ PP(pp_readdir)
 #else
         sv = newSVpv(dp->d_name, 0);
 #endif
-#ifndef INCOMPLETE_TAINTS
         if (!(IoFLAGS(io) & IOf_UNTAINT))
             SvTAINTED_on(sv);
-#endif
         mXPUSHs(sv);
     } while (gimme == G_ARRAY);
 
@@ -5210,11 +5206,9 @@ PP(pp_gpwent)
            sv_setpv(sv, pwent->pw_passwd);
 #   endif
 
-#   ifndef INCOMPLETE_TAINTS
        /* passwd is tainted because user himself can diddle with it.
         * admittedly not much and in a very limited way, but nevertheless. */
        SvTAINTED_on(sv);
-#   endif
 
         sv_setuid(PUSHmortal, pwent->pw_uid);
         sv_setgid(PUSHmortal, pwent->pw_gid);
@@ -5257,18 +5251,14 @@ PP(pp_gpwent)
 #   else
        PUSHs(sv = sv_mortalcopy(&PL_sv_no));
 #   endif
-#   ifndef INCOMPLETE_TAINTS
        /* pw_gecos is tainted because user himself can diddle with it. */
        SvTAINTED_on(sv);
-#   endif
 
        mPUSHs(newSVpv(pwent->pw_dir, 0));
 
        PUSHs(sv = sv_2mortal(newSVpv(pwent->pw_shell, 0)));
-#   ifndef INCOMPLETE_TAINTS
        /* pw_shell is tainted because user himself can diddle with it. */
        SvTAINTED_on(sv);
-#   endif
 
 #   ifdef PWEXPIRE
        mPUSHi(pwent->pw_expire);
diff --git a/util.c b/util.c
index ce4c7b6..f020b4b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3757,9 +3757,7 @@ Perl_getcwd_sv(pTHX_ SV *sv)
 {
 #ifndef PERL_MICRO
     dVAR;
-#ifndef INCOMPLETE_TAINTS
     SvTAINTED_on(sv);
-#endif
 
     PERL_ARGS_ASSERT_GETCWD_SV;
 
index a1e810d..15d80f9 100644 (file)
@@ -2449,9 +2449,7 @@ XS(w32_GetCwd)
   EXTEND(SP,1);
   SvPOK_on(sv);
   ST(0) = sv;
-#ifndef INCOMPLETE_TAINTS
   SvTAINTED_on(ST(0));
-#endif
   XSRETURN(1);
 }