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

firejail: override files should be in /etc/firejail #47718

Merged
merged 1 commit into from Oct 23, 2018

Conversation

peterhoeg
Copy link
Member

Motivation for this change

All the profiles are correctly loaded from $out/etc/firejail but the .local files used for overrides should still be in /etc/firejail.

Would be nice if #45469 could be adjusted to also support writing /etc/firejail... (hint hint @dotlambda)

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.

@peterhoeg
Copy link
Member Author

@dotlambda, just after hitting submit, I just thought of what might be the nicer option:

  1. split out the $out/etc/firejail files into a separate derivation
  2. have the programs.firejail module support taking a list of packages with config
  3. automatically add the config from step 1
  4. a mechanism to create a new derivation with overrides and add that to the list in step 2

This PR however, is obviously the easier option...

@peterhoeg
Copy link
Member Author

Taking the liberty of roping in @matthewbauer

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: firejail

Partial log (click to expand)

shrinking /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/lib/firejail/libtrace.so
shrinking /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/bin/firecfg
shrinking /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/bin/firemon
shrinking /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/bin/firejail
gzipping man pages under /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/share/man/
strip is /nix/store/428gs2z4b8f9byvghzlpbjwjb3a7jwxx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/lib  /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56/bin
patching script interpreter paths in /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56
checking for references to /build in /nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56...
/nix/store/82kpzpzm0zfbpgql262hfg23c0l0llm7-firejail-0.9.56

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: firejail

Partial log (click to expand)

shrinking /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/lib/firejail/fbuilder
shrinking /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/lib/firejail/fsec-print
shrinking /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/lib/firejail/fldd
shrinking /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/lib/firejail/libtracelog.so
gzipping man pages under /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/share/man/
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/lib  /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56/bin
patching script interpreter paths in /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56
checking for references to /build in /nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56...
/nix/store/ihdd5cabj1scjmfdbiz2l24wix5kpy2s-firejail-0.9.56

@peterhoeg peterhoeg merged commit a080e0a into NixOS:master Oct 23, 2018
@peterhoeg peterhoeg deleted the f/fj branch October 23, 2018 08:57
@peterhoeg peterhoeg restored the f/fj branch October 23, 2018 09:22
@peterhoeg peterhoeg deleted the f/fj branch October 24, 2018 03:57
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

2 participants