Loading ...
Sorry, an error occurred while loading the content.

Patch 7.2.027

Expand Messages
  • Bram Moolenaar
    Patch 7.2.027 Problem: Can use cscope commands in the sandbox. Solution: Disallow them, they might not be safe. Files: src/ex_cmds.h ...
    Message 1 of 5 , Nov 6, 2008
    • 0 Attachment
      Patch 7.2.027
      Problem: Can use cscope commands in the sandbox.
      Solution: Disallow them, they might not be safe.
      Files: src/ex_cmds.h


      *** ../vim-7.2.026/src/ex_cmds.h Thu Sep 18 12:43:21 2008
      --- src/ex_cmds.h Thu Sep 18 22:18:14 2008
      ***************
      *** 278,284 ****
      EX(CMD_crewind, "crewind", ex_cc,
      RANGE|NOTADR|COUNT|TRLBAR|BANG),
      EX(CMD_cscope, "cscope", do_cscope,
      ! EXTRA|NOTRLCOM|SBOXOK|XFILE),
      EX(CMD_cstag, "cstag", do_cstag,
      BANG|TRLBAR|WORD1),
      EX(CMD_cunmap, "cunmap", ex_unmap,
      --- 278,284 ----
      EX(CMD_crewind, "crewind", ex_cc,
      RANGE|NOTADR|COUNT|TRLBAR|BANG),
      EX(CMD_cscope, "cscope", do_cscope,
      ! EXTRA|NOTRLCOM|XFILE),
      EX(CMD_cstag, "cstag", do_cstag,
      BANG|TRLBAR|WORD1),
      EX(CMD_cunmap, "cunmap", ex_unmap,
      ***************
      *** 506,512 ****
      EX(CMD_lclose, "lclose", ex_cclose,
      RANGE|NOTADR|COUNT|TRLBAR),
      EX(CMD_lcscope, "lcscope", do_cscope,
      ! EXTRA|NOTRLCOM|SBOXOK|XFILE),
      EX(CMD_left, "left", ex_align,
      TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
      EX(CMD_leftabove, "leftabove", ex_wrongmodifier,
      --- 506,512 ----
      EX(CMD_lclose, "lclose", ex_cclose,
      RANGE|NOTADR|COUNT|TRLBAR),
      EX(CMD_lcscope, "lcscope", do_cscope,
      ! EXTRA|NOTRLCOM|XFILE),
      EX(CMD_left, "left", ex_align,
      TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
      EX(CMD_leftabove, "leftabove", ex_wrongmodifier,
      ***************
      *** 653,658 ****
      --- 653,660 ----
      EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
      EX(CMD_open, "open", ex_open,
      RANGE|EXTRA),
      + EX(CMD_oldfiles, "oldfiles", ex_oldfiles,
      + BANG|TRLBAR|SBOXOK|CMDWIN),
      EX(CMD_omap, "omap", ex_map,
      EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
      EX(CMD_omapclear, "omapclear", ex_mapclear,
      ***************
      *** 804,810 ****
      EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
      WORD1|TRLBAR|CMDWIN),
      EX(CMD_scscope, "scscope", do_scscope,
      ! EXTRA|NOTRLCOM|SBOXOK),
      EX(CMD_set, "set", ex_set,
      TRLBAR|EXTRA|CMDWIN|SBOXOK),
      EX(CMD_setfiletype, "setfiletype", ex_setfiletype,
      --- 806,812 ----
      EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
      WORD1|TRLBAR|CMDWIN),
      EX(CMD_scscope, "scscope", do_scscope,
      ! EXTRA|NOTRLCOM),
      EX(CMD_set, "set", ex_set,
      TRLBAR|EXTRA|CMDWIN|SBOXOK),
      EX(CMD_setfiletype, "setfiletype", ex_setfiletype,
      *** ../vim-7.2.026/src/version.c Sat Nov 1 13:51:57 2008
      --- src/version.c Thu Nov 6 10:21:21 2008
      ***************
      *** 678,679 ****
      --- 678,681 ----
      { /* Add new patch number below this line */
      + /**/
      + 27,
      /**/

      --
      hundred-and-one symptoms of being an internet addict:
      179. You wonder why your household garbage can doesn't have an
      "empty recycle bin" button.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bill McCarthy
      ... After this patch, since its a header file, I did a make clean before building. When it came to compiling ex_docmd.c I received error messages and the
      Message 2 of 5 , Nov 6, 2008
      • 0 Attachment
        On Thu 6-Nov-08 4:03am -0600, Bram Moolenaar wrote:

        > Patch 7.2.027
        > Problem: Can use cscope commands in the sandbox.
        > Solution: Disallow them, they might not be safe.
        > Files: src/ex_cmds.h

        After this patch, since its a header file, I did a make
        clean before building. When it came to compiling ex_docmd.c
        I received error messages and the process ended. Here are
        the first few messages:

        In file included from ex_docmd.c:466:
        ex_cmds.h:656: error: `ex_oldfiles' undeclared here (not in a function)
        ex_cmds.h:656: error: initializer element is not constant
        ex_cmds.h:656: error: (near initialization for `cmdnames[280].cmd_func')
        ex_cmds.h:656: error: initializer element is not constant
        ex_cmds.h:656: error: (near initialization for `cmdnames[280]')

        --
        Best regards,
        Bill



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Charles Campbell
        ... I had the same problem; but I was able to manually fix it just fine; line 657 should be: BANG|TRLBAR|SBOXOK|CMDWIN), I suspect we both had applied the
        Message 3 of 5 , Nov 6, 2008
        • 0 Attachment
          Bill McCarthy wrote:
          > On Thu 6-Nov-08 4:03am -0600, Bram Moolenaar wrote:
          >
          >
          >> Patch 7.2.027
          >> Problem: Can use cscope commands in the sandbox.
          >> Solution: Disallow them, they might not be safe.
          >> Files: src/ex_cmds.h
          >>
          >
          > After this patch, since its a header file, I did a make
          > clean before building. When it came to compiling ex_docmd.c
          > I received error messages and the process ended. Here are
          > the first few messages:
          >
          > In file included from ex_docmd.c:466:
          > ex_cmds.h:656: error: `ex_oldfiles' undeclared here (not in a function)
          > ex_cmds.h:656: error: initializer element is not constant
          > ex_cmds.h:656: error: (near initialization for `cmdnames[280].cmd_func')
          > ex_cmds.h:656: error: initializer element is not constant
          > ex_cmds.h:656: error: (near initialization for `cmdnames[280]')
          >
          >
          I had the same problem; but I was able to manually fix it just fine;
          line 657 should be:

          BANG|TRLBAR|SBOXOK|CMDWIN),

          I suspect we both had applied the experimental "oldfiles" patch earlier
          and patch#27 assumes otherwise.

          Regards,
          Chip Campbell


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Bill McCarthy
          ... I don t recall the experimental patch. Noting that the new header file was already in svn. I replaced my patched version and tried again - same result.
          Message 4 of 5 , Nov 6, 2008
          • 0 Attachment
            On Thu 6-Nov-08 9:15am -0600, Charles Campbell wrote:

            >
            > Bill McCarthy wrote:
            >> On Thu 6-Nov-08 4:03am -0600, Bram Moolenaar wrote:
            >>
            >>
            >>> Patch 7.2.027
            >>> Problem: Can use cscope commands in the sandbox.
            >>> Solution: Disallow them, they might not be safe.
            >>> Files: src/ex_cmds.h
            >>>
            >>
            >> After this patch, since its a header file, I did a make
            >> clean before building. When it came to compiling ex_docmd.c
            >> I received error messages and the process ended. Here are
            >> the first few messages:
            >>
            >> In file included from ex_docmd.c:466:
            >> ex_cmds.h:656: error: `ex_oldfiles' undeclared here (not in a function)
            >> ex_cmds.h:656: error: initializer element is not constant
            >> ex_cmds.h:656: error: (near initialization for `cmdnames[280].cmd_func')
            >> ex_cmds.h:656: error: initializer element is not constant
            >> ex_cmds.h:656: error: (near initialization for `cmdnames[280]')
            >>
            >>
            > I had the same problem; but I was able to manually fix it just fine;
            > line 657 should be:
            >
            > BANG|TRLBAR|SBOXOK|CMDWIN),
            >
            > I suspect we both had applied the experimental "oldfiles" patch earlier
            > and patch#27 assumes otherwise.

            I don't recall the experimental patch. Noting that the new
            header file was already in svn. I replaced my patched
            version and tried again - same result.

            --
            Best regards,
            Bill


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • sc
            ... I generally avoid patches -- my source is from mainline svn only -- I too did a make clean , and got a slightly different error: ex_cmds.h:656: error:
            Message 5 of 5 , Nov 6, 2008
            • 0 Attachment
              On Thursday 06 November 2008 9:57 am, Bill McCarthy wrote:
              >
              > On Thu 6-Nov-08 9:15am -0600, Charles Campbell wrote:
              >
              > >
              > > Bill McCarthy wrote:
              > >> On Thu 6-Nov-08 4:03am -0600, Bram Moolenaar wrote:
              > >>
              > >>
              > >>> Patch 7.2.027
              > >>> Problem: Can use cscope commands in the sandbox.
              > >>> Solution: Disallow them, they might not be safe.
              > >>> Files: src/ex_cmds.h
              > >>>
              > >>
              > >> After this patch, since its a header file, I did a make
              > >> clean before building. When it came to compiling ex_docmd.c
              > >> I received error messages and the process ended. Here are
              > >> the first few messages:
              > >>
              > >> In file included from ex_docmd.c:466:
              > >> ex_cmds.h:656: error: `ex_oldfiles' undeclared here (not in a function)
              > >> ex_cmds.h:656: error: initializer element is not constant
              > >> ex_cmds.h:656: error: (near initialization for `cmdnames[280].cmd_func')
              > >> ex_cmds.h:656: error: initializer element is not constant
              > >> ex_cmds.h:656: error: (near initialization for `cmdnames[280]')
              > >>
              > >>
              > > I had the same problem; but I was able to manually fix it just fine;
              > > line 657 should be:
              > >
              > > BANG|TRLBAR|SBOXOK|CMDWIN),
              > >
              > > I suspect we both had applied the experimental "oldfiles" patch earlier
              > > and patch#27 assumes otherwise.
              >
              > I don't recall the experimental patch. Noting that the new
              > header file was already in svn. I replaced my patched
              > version and tried again - same result.

              I generally avoid patches -- my source is from mainline svn only -- I
              too did a 'make clean', and got a slightly different error:

              ex_cmds.h:656: error: 'ex_oldfiles' undeclared here (not in a function)
              make[1]: *** [objects/ex_docmd.o] Error 1

              Further, my line 657 in ex_cmds.h is exactly as quoted above.

              I may well be stuck at 7.2.26 until this is resolved...

              sc

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            Your message has been successfully submitted and would be delivered to recipients shortly.