[patch@35055] VMS parsing not handling no-priv cases

[email protected] ("John E. Malmberg")
Newsgroups perl.perl5.porters,perl.vmsperl
Message-ID <[email protected]>
The VMS parsing routines were failing on files that the process 
currently did not have access to, instead of falling back to a syntax 
only check.

We may want to consider always falling back to a syntax only check as 
there may be more non-fatal return codes of these type.

-John
[email protected]
Personal Opinion Only
vms_c_rms_nopriv.gdiff (text/plain, 1.1 KB)
--- /ref2_root/perl/vms/vms.c	Sun Dec  7 08:47:36 2008
+++ vms/vms.c	Sun Dec  7 08:53:17 2008
@@ -5478,10 +5478,13 @@
 
     /* Could not find the file, try as syntax only if error is not fatal */
     rms_set_nam_nop(mynam, NAM$M_SYNCHK);
-    if (retsts == RMS$_DNF || retsts == RMS$_DIR || retsts == RMS$_DEV) {
+    if (retsts == RMS$_DNF ||
+         retsts == RMS$_DIR ||
+         retsts == RMS$_DEV ||
+         retsts == RMS$_PRV) {
       retsts = sys$parse(&myfab,0,0);
       if (retsts & STS$K_SUCCESS) goto expanded;
-    }  
+    }
 
      /* Still could not parse the file specification */
     /*----------------------------------------------*/
@@ -6047,7 +6050,9 @@
       for (cp = trndir; *cp; cp++)
         if (islower(*cp)) { haslower = 1; break; }
       if (!((sts = sys$parse(&dirfab)) & STS$K_SUCCESS)) {
-        if ((dirfab.fab$l_sts == RMS$_DIR) || (dirfab.fab$l_sts == RMS$_DNF)) {
+        if ((dirfab.fab$l_sts == RMS$_DIR) ||
+            (dirfab.fab$l_sts == RMS$_DNF) ||
+            (dirfab.fab$l_sts == RMS$_PRV)) {
 	  rms_set_nam_nop(dirnam, NAM$M_SYNCHK);
           sts = sys$parse(&dirfab) & STS$K_SUCCESS;
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.