Announcement

Collapse
No announcement yet.

Vi IMproved 7.3 Released w/ Fixes + New Features

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by pingufunkybeat View Post
    I think it's more to protect users from other sneaky users.

    But yeah, I'm not sure whether the swap files inherit the original file's permissions and whatnot. There are likely corner cases involved. It was probably a much requested feature that finally got implemented. You don't have to use it if you don't feel the need (I don't).
    It does inherit the permissions from the original file - but the problem is not the swap file permissions, but the swap file location.
    E.g. open /home/testuser/bin/test.sh, vim will create a swap file in /var/tmp/test.sh.swap - alas, /var/tmp is open for all users, while /home/testuser is open only for testuser. Bingo: attack vector.

    - Gilboa
    oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
    oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
    oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
    Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

    Comment


    • #12
      For me, it always opens the swap file in the same directory as the file. In fact, it's configurable, and you can tell it to put them all into a hidden temporary directory or something else.

      Comment


      • #13
        Originally posted by gilboa View Post
        It does inherit the permissions from the original file - but the problem is not the swap file permissions, but the swap file location.
        E.g. open /home/testuser/bin/test.sh, vim will create a swap file in /var/tmp/test.sh.swap - alas, /var/tmp is open for all users, while /home/testuser is open only for testuser. Bingo: attack vector.

        - Gilboa
        False. It opens the swap in /home/testuser/bin/ and it cribs if it can't.

        If you configured it to use /var/tmp, then the problem is between the chair and monitor, not in ViM.

        Comment


        • #14
          Originally posted by devsk View Post
          False. It opens the swap in /home/testuser/bin/ and it cribs if it can't.

          If you configured it to use /var/tmp, then the problem is between the chair and monitor, not in ViM.
          Because we all compile VIM by hand and never use the distribution supplied packages.

          (I'd add something funny comparing your IQ to my shoe size, but its 5.36 am and I'm far too tired and busy to spent any mental resources on mocking you.)

          Flames aside, I should fix my previous message, at least in the Fedora package, vim seems to alternate between using /var/tmp and using the local directory when it comes to placing the .swap file, when backupdir isn't defined in vimrc. I assumed that it was a global behavior and not Fedora specific. (Guess I was wrong).

          - Gilboa
          oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
          oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
          oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
          Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

          Comment


          • #15
            /backupdir/dir[ectory]/ isn't defined.
            oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
            oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
            oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
            Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

            Comment


            • #16
              Originally posted by gilboa View Post
              Because we all compile VIM by hand and never use the distribution supplied packages.

              (I'd add something funny comparing your IQ to my shoe size, but its 5.36 am and I'm far too tired and busy to spent any mental resources on mocking you.)

              Flames aside, I should fix my previous message, at least in the Fedora package, vim seems to alternate between using /var/tmp and using the local directory when it comes to placing the .swap file, when backupdir isn't defined in vimrc. I assumed that it was a global behavior and not Fedora specific. (Guess I was wrong).

              - Gilboa
              hehe...You are using world writable directory as your swap and my IQ is low?

              Comment


              • #17
                hehe... Fedora is using world writeable directory (/var/tmp) as the the alternate swap and my IQ is low?

                Here. Fixed it for you.

                - Gilboa
                oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
                oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
                oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
                Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

                Comment


                • #18
                  Originally posted by gilboa View Post
                  hehe... Fedora is using world writeable directory (/var/tmp) as the the alternate swap and my IQ is low?

                  Here. Fixed it for you.

                  - Gilboa
                  OK, my apologies for starting this stupidity! I am sorry dude! I think I may have gone overboard.

                  Comment


                  • #19
                    Same here. (Was too early, had a short fuse).
                    Both me and my shoes apologies.
                    oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
                    oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
                    oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
                    Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

                    Comment

                    Working...
                    X