Craig A. Berry wrote:
At 2:23 PM -0600 2/13/03, Patrick Spinler wrote:

Craig A. Berry wrote:

Do you have a simple case that
will exercise the bug?
$ mcr authorize add /id /attrib=subsystem testing_subsys_id
$ mcr grant/id testing_subsys_id testaccount
$ set host 0
login: testaccount
...
$ perl
(failure here)

Very odd, but I can't reproduce it using that.
Sorry.  I missed a qualifier on the grant/id line.  Change
$ mcr grant/id testing_subsys_id testaccount
to
$ mcr grant/id/attr=subsys testing_subsys_id testaccount

Patrick, if you have a chance to test this, I'd appreciate it.  I
have exercised the new code in the debugger and it looks like it's
doing the right thing, but this is pretty twisty stuff.
This works for me. At least, I can now run a miniperl with this patch. I'll rebuild a full perl with it in place, and try stuff out and let you know what happens.

Thanks a ton !
-- Pat

+++ vms/vms.c   Thu Feb 13 18:05:12 2003
@@ -4449,15 +4449,19 @@
    * hasn't been allocated when vms_image_init() is called.
    */
   if (will_taint) {
-    char ***newap;
-    New(1320,newap,*argcp+2,char **);
-    newap[0] = argvp[0];
-    *newap[1] = "-T";
-    Copy(argvp[1],newap[2],*argcp-1,char **);
+    char **newargv, **oldargv;
+    oldargv = *argvp;
+    New(1320,newargv,(*argcp)+2,char *);
+    newargv[0] = oldargv[0];
+    New(1320,newargv[1],3,char);
+    strcpy(newargv[1], "-T");
+    Copy(&oldargv[1],&newargv[2],(*argcp)-1,char **);
+    (*argcp)++;
+    newargv[*argcp] = NULL;
     /* We orphan the old argv, since we don't know where it's come from,
      * so we don't know how to free it.
      */
-    *argcp++; argvp = newap;
+    *argvp = newargv;
   }
   else {  /* Did user explicitly request tainting? */
     int i;
[end of patch]
--
      This message does not represent the policies or positions
	     of the Mayo Foundation or its subsidiaries.
  Patrick Spinler			email:	[EMAIL PROTECTED]
  Mayo Foundation			phone:	507/284-9485

Reply via email to