• kevincox@lemmy.mlM
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    Out of the box no. But it would be easy to implement if you don’t need very complex rules. (I don’t actually know how permissions work for sudoedit.)

    • bamboo@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      sudoedit copies a file to a temp directory, invokes $EDITOR with that temp file, and after the editor process exits, it copies the file back to overwrite the original. This way you get your user preferred and configured editor, but it doesn’t have any elevated privileges.