summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-02-27 05:07:08 +0000
committerbailey <bailey@newman.upenn.edu>2000-02-27 05:07:08 +0000
commit2512681bdbf12f76d592243ee177aae83c6bb3d3 (patch)
tree4a9b740bbde03e7e856a3a99b0b913c59359693a /vms/vms.c
parent46726cbe13a1bbdca5ff648034840cd7466b80c5 (diff)
downloadperl-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index cf8ccd2c13..deae32f998 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -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