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

firehol: init at 3.1.4, iprange: init at 1.0.3 #29125

Merged
merged 3 commits into from Sep 13, 2017
Merged

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Sep 8, 2017

Motivation for this change

This commit adds the FireHOL-software (v3.1.4) and it's dependency iprange (v1.0.3). The FireHOL-package also contains FireQOS, which is a human-friendly tc-wrapper. A NixOS-module to interact with FireQOS was also provided.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@geistesk, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @offlinehacker to be potential reviewers.

@oxzi oxzi mentioned this pull request Sep 8, 2017
8 tasks
@Mic92
Copy link
Member

Mic92 commented Sep 8, 2017

Can you make one commit per application?
And one commit for the service, something like: nixos/firehol: add service

+ #fi
])

AS_IF([test "x$ac_cv_ping_6_opt" = "xyes"],[
Copy link
Member

@Mic92 Mic92 Sep 8, 2017

Choose a reason for hiding this comment

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

Is this ping command used at any point without root? If, yes we have to point at /run/wrappers/bin/ping to run the setuid version of it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you point me to an example for this?
And is this even required? I think we can assume that the newer ping is available.
Thanks for your feedback!

Copy link
Member

Choose a reason for hiding this comment

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

what I mean to say, if you just let autotools detect ping it will take the ping from the nix store. This ping has no setuid bit set, so it will be only usable by root. Now the question is, if this ever a problem from this application.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, afaik fireqos won't start unless you run it as root. So I don't see a problem there.

Copy link
Member

@Mic92 Mic92 Sep 11, 2017

Choose a reason for hiding this comment

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

I would hard-code ping6 path here, because otherwise the service will not find the binary later in the service.

Copy link
Member Author

@oxzi oxzi Sep 13, 2017

Choose a reason for hiding this comment

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

Why should the old ping6 be preferred over the newer ping-version with the -6-flag? Fire{HOL,QOS} seems to work fine with the given ping-command because it must be run as root.
Edit: I'll change the ping-executable with the one at /run/wrappers/bin/ping.

default = false;
description = ''
If enabled, FireQOS will be launched with the specified
configuration given in `qosConfig`;
Copy link
Member

Choose a reason for hiding this comment

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

- configuration given in `qosConfig`;
+ configuration given in `qosConfig`.

Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.firehol}/bin/fireqos start ${fireqosConfig}";
ExecStop = "${pkgs.firehol}/bin/fireqos stop; ${pkgs.firehol}/bin/fireqos clear_all_qos";
Copy link
Member

Choose a reason for hiding this comment

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

This is not a shell. you can not run two commands by using ;.
Try something like:

ExecStop = [
  "${pkgs.firehol}/bin/fireqos stop" 
  "${pkgs.firehol}/bin/fireqos clear_all_qos"
];

@Mic92 Mic92 merged commit 13edd97 into NixOS:master Sep 13, 2017
@Mic92
Copy link
Member

Mic92 commented Sep 13, 2017

Thanks!

@oxzi oxzi deleted the firehol-3.1.4 branch October 12, 2017 17:43
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.

None yet

3 participants