Skip to content

nix-darwin: sudo --set-home for multiple user activation (#2857)#2858

Merged
berbiche merged 1 commit intorelease-21.11from
backport-2857
Apr 1, 2022
Merged

nix-darwin: sudo --set-home for multiple user activation (#2857)#2858
berbiche merged 1 commit intorelease-21.11from
backport-2857

Conversation

@kalbasit
Copy link
Copy Markdown
Member

@kalbasit kalbasit commented Apr 1, 2022

Changing from sudo -i to sudo -s messes up activation when multiple
users are managed. --set-home should have similar behavior to -i in
that the activation script is run from the user's home directory.

Fixes #2856

(cherry picked from commit e1fab01)

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

Changing from `sudo -i` to `sudo -s` messes up activation when multiple
users are managed. `--set-home` should have similar behavior to `-i` in
that the activation script is run from the user's home directory.

Fixes #2856

(cherry picked from commit e1fab01)
@kalbasit kalbasit requested a review from rycee as a code owner April 1, 2022 15:48
@berbiche berbiche merged commit 0bdbdea into release-21.11 Apr 1, 2022
@kalbasit kalbasit deleted the backport-2857 branch April 2, 2022 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants