Skip to content

Store .sorry and .oldshell outside of user dir #156

@kpengboy

Description

@kpengboy

We currently store the sorry reason and old shell in the ~/.sorry and ~/.oldshell files respectively of the sorried user. This is a dangerous practice, because:

  • If the user had something valuable in the ~/.sorry file, we overwrite it.
  • If the user had an existing ~/.oldshell file, we lose the info about the old shell.
  • Worst of all, ~/.sorry could be a symlink created by an attacker to point to important system files. In that case, we would just overwrite those files. (And the scary thing is the script, running as root, actually has permissions to do this.)

We should store this information elsewhere, preferably in a directory that only we control.

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