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

Fix "batch" command on NixOS #30423

Merged
merged 3 commits into from Oct 16, 2017
Merged

Fix "batch" command on NixOS #30423

merged 3 commits into from Oct 16, 2017

Conversation

bjornfor
Copy link
Contributor

Motivation for this change

Fix #12392

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
    • 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/)
  • Fits CONTRIBUTING.md.

@yesbox
Copy link
Contributor

yesbox commented Oct 14, 2017

Works fine now on NixOS 17.09 with this patch and looks like it shouldn't break the package on other OSes or without the NixOS module.

@yesbox
Copy link
Contributor

yesbox commented Oct 14, 2017

You could also remove "batch" from the from the list of programs to be wrapped in the atd service module. It probably never worked in the first place and now doesn't serve a purpose.

@bjornfor
Copy link
Contributor Author

Good catch. Fixed.

"batch" is a shell script so invoking it via setuid wrapper never worked
anyway. (The kernel drops perms on executables with shebang.) A previous
nixpkgs commit made "batch" invoke the NixOS setuid "at" wrapper to gain
needed privileges.

Thanks to @yesbox for noticing.
@bjornfor bjornfor merged commit 497108b into NixOS:master Oct 16, 2017
@bjornfor bjornfor deleted the fix-atd-batch branch October 16, 2017 17:13
@bjornfor
Copy link
Contributor Author

Applied to master and cherry-picked to release-17.09.

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