diff options
author | Charles Bailey <bailey@newman.upenn.edu> | 2000-02-27 05:07:08 +0000 |
---|---|---|
committer | bailey <bailey@newman.upenn.edu> | 2000-02-27 05:07:08 +0000 |
commit | 2512681bdbf12f76d592243ee177aae83c6bb3d3 (patch) | |
tree | 4a9b740bbde03e7e856a3a99b0b913c59359693a /vms/vms.c | |
parent | 46726cbe13a1bbdca5ff648034840cd7466b80c5 (diff) | |
download | perl-2512681bdbf12f76d592243ee177aae83c6bb3d3.tar.gz |
Impose security constraints on lnm lookup only if tainting
p4raw-id: //depot/vmsperl@5282
Diffstat (limited to 'vms/vms.c')
-rw-r--r-- | vms/vms.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -273,6 +273,8 @@ Perl_my_getenv(pTHX_ const char *lnm, bool sys) idx = strtoul(cp2+1,NULL,0); lnm = uplnm; } + /* Impose security constraints only if tainting */ + if (sys) sys = PL_curinterp ? PL_tainting : will_taint; if (vmstrnenv(lnm,eqv,idx, sys ? fildev : NULL, #ifdef SECURE_INTERNAL_GETENV @@ -319,6 +321,8 @@ my_getenv_len(const char *lnm, unsigned long *len, bool sys) idx = strtoul(cp2+1,NULL,0); lnm = buf; } + /* Impose security constraints only if tainting */ + if (sys) sys = PL_curinterp ? PL_tainting : will_taint; if ((*len = vmstrnenv(lnm,buf,idx, sys ? fildev : NULL, #ifdef SECURE_INTERNAL_GETENV |