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

postfix: add setgid wrapper for postqueue/postdrop #48460

Merged
merged 1 commit into from Oct 17, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Oct 15, 2018

Both postqueue[1] and postdrop[2] implement a subset of administration
tasks that are supposed to be run unprivileged users
and require the setgid bit to full-fill this task.

[1] http://www.postfix.org/postqueue.1.html
[2] http://www.postfix.org/postdrop.1.html

Motivation for this change
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.

Both postqueue[1] and postdrop[2] implement a subset of administration
task that are supposed to be run unprivileged users
and require the setgid bit to full-fill this task.

[1] http://www.postfix.org/postqueue.1.html
[2] http://www.postfix.org/postdrop.1.html
@Mic92
Copy link
Member Author

Mic92 commented Oct 15, 2018

Deployed as is on my server.

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: postfix

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: postfix

Partial log (click to expand)

these paths will be fetched (2.31 MiB download, 18.63 MiB unpacked):
  /nix/store/6n0mj5rgbfk0ahrk2gfhdjw8qbvypppx-postfix-3.3.1
copying path '/nix/store/6n0mj5rgbfk0ahrk2gfhdjw8qbvypppx-postfix-3.3.1' from 'https://cache.nixos.org'...
/nix/store/6n0mj5rgbfk0ahrk2gfhdjw8qbvypppx-postfix-3.3.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: postfix

Partial log (click to expand)

these paths will be fetched (2.61 MiB download, 18.98 MiB unpacked):
  /nix/store/i3w00macinabbk9f1sdk8vqlfzyssk4p-cyrus-sasl-2.1.26-dev
  /nix/store/pcsfvqyf44vqjpmpgip37mw0d5vsgqp6-postfix-3.3.1
  /nix/store/v5ivp0l5wvjq8l73g6r671plj45jxq1c-cyrus-sasl-2.1.26-bin
copying path '/nix/store/v5ivp0l5wvjq8l73g6r671plj45jxq1c-cyrus-sasl-2.1.26-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/i3w00macinabbk9f1sdk8vqlfzyssk4p-cyrus-sasl-2.1.26-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/pcsfvqyf44vqjpmpgip37mw0d5vsgqp6-postfix-3.3.1' from 'https://cache.nixos.org'...
/nix/store/pcsfvqyf44vqjpmpgip37mw0d5vsgqp6-postfix-3.3.1

@Mic92 Mic92 merged commit f6ded23 into NixOS:master Oct 17, 2018
@Mic92 Mic92 deleted the postfix-setuid branch October 17, 2018 13:48
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