Skip to content

visudo creates file even if editor is closed without saving #294

@ReillyBrogan

Description

@ReillyBrogan

I noticed this when in the process of updating the Solus sudo package to 1.9.14p2.

If you run visudo /non-existant-file and then exit without saving the file (for instance, in Nano using ctrl+x) the end result will be that visudo will create an empty /non-existant-file.

This seems undesirable to me, perhaps the user simply misspelled a file name and exited to use a different file name. In that case they would not expect the misspelled file to be created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions