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

nix-daemon: allow more safe settings by "untrusted" users. #3037

Closed

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Aug 9, 2019

These options are mostly selected based on my usage
and judging each to only change "superficial" properties
of the build or output printed.

I particularly find it useful to ask builds to only
use remote builders (when on laptop, esp battery),
hence the --max-jobs 0 whitelisting.

TTL settings can be useful when debugging either
a build cache (mostly forcing re-fetching)
or fetching latest copy of a URL such as
https://github.com/NixOS/nixpkgs/archive/master.tar.gz
(most commonly I used this to ensure my NixOps deployments
use latest version of branch they're pointed at, for
faster/sane change/deploy cycles).

I think setting show-trace is safe,
assuming the eval is performed by the user
and so any increased memory usage is theirs.

I don't think we are concerned about tracing
exposing (or being disabled to "hide") information
from untrusted users, but LMK if that's not right.

In the future it might be nice to add alias options
--remote-only or --local-only or something,
but for now don't reject the current method for
requesting the behavior.

@edolstra
Copy link
Member

This is largely redundant due to 7298a38.

@dtzWill
Copy link
Member Author

dtzWill commented Sep 17, 2019

Okay, will close this then, thanks! :)

@dtzWill dtzWill closed this Sep 17, 2019
@arcnmx
Copy link
Member

arcnmx commented Sep 20, 2019

Is show-trace meant to be omitted from the list in 7298a38? 2.3 generates spurious warnings with that flag despite functioning as expected (it shows the trace when evaluating as the user).

@zimbatm
Copy link
Member

zimbatm commented Sep 21, 2019

--show-trace is a client-side option. If it's not, it should be filtered out as well. The daemon will not make use of it.

@dtzWill
Copy link
Member Author

dtzWill commented Oct 30, 2019

In case it's useful, here's the same change after moving nix-daemon code into libstore:

dtzWill@5016284

Regretted reverting this change, both because of squelched warnings and because I use tarball-ttl 0 in places to ensure I'm building what I think i am :). Anyway, enjoy if useful.

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

4 participants