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

sshd: Add user options for ForceCommand and ChrootDirectory #53024

Closed
wants to merge 1 commit into from

Conversation

ajs124
Copy link
Member

@ajs124 ajs124 commented Dec 28, 2018

Motivation for this change

I would like to limit a user to only sftp, which is possible by using extraConfig, but this is much nicer.

I think this use case is common enough to have it in nixpkgs.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@samueldr
Copy link
Member

(triage) at first glance this looks good. Can you update the PR to fix the conflicts? Thanks!

@ajs124
Copy link
Member Author

ajs124 commented Jul 27, 2019

Rebased, should be fine now. One reason why certain people might not want to merge this is RFC 0042.

@samueldr
Copy link
Member

I'm not entirely up to speed with the RFC, an what it will mean in the end.

Though, I think the RFC would not affect these options, they are augmentations, compared to the behaviour of sshd; the options are configured on the user, rather than having to manually match users in the configuration. AFAIUI RFC 42 is more about reducing the amount of "dumb" 1:1 mappings between options and configuration files.

Though I can see the ground would be to map a settings-based approach, something like users.users.<name?>.openssh.matchBlock where it maps through such a module to any openssh option for that user.

So yeah, you're right, let's see how RFC 42 goes I guess.

@ajs124 ajs124 closed this Dec 27, 2019
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

3 participants