Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/users: fix users home directory with isNormalUser #49064

Merged
merged 1 commit into from Oct 26, 2018

Conversation

jslight90
Copy link
Contributor

Motivation for this change

bugfix: /home/unnamed-## user directories

The users.users option accepts either a list of sets or a set of sets. When passing a list of sets, it is converted into a set of sets with "unnamed-##" as the index keys.
If you use the users.users.<name?>.isNormalUser option, it was referring to the index key of the set to generate the home directory path.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@ryantm
Copy link
Member

ryantm commented Oct 24, 2018

Let's run some NixOS tests that use users:
@GrahamcOfBorg test opensmtpd ecryptfs

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.opensmtpd, tests.ecryptfs

Partial log (click to expand)

syncing
machine: running command: sync
machine: exit status 0
test script finished in 42.62s
cleaning up
killing machine (pid 597)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/iwrbdqkmrj0vqc4q50rwd7jxz4gfzb7m-vm-test-run-opensmtpd
/nix/store/g7frj4cpgqpx54m6cpd2lvlzldqs0kca-vm-test-run-ecryptfs

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.opensmtpd, tests.ecryptfs

Partial log (click to expand)

smtp2: exit status 0
test script finished in 96.69s
cleaning up
killing smtp1 (pid 631)
killing client (pid 644)
killing smtp2 (pid 657)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/b41v8rss8fcbrg4l42b6gbnpxd8lrdp5-vm-test-run-opensmtpd
/nix/store/lxagmlk8zwc10h16p716k9hjffjibv1d-vm-test-run-ecryptfs

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed a bug, good catch!

@infinisil infinisil merged commit d67da5b into NixOS:master Oct 26, 2018
@jslight90 jslight90 deleted the users branch October 27, 2018 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants