Daemon: warn when an untrusted user cannot override a setting
In a daemon-based Nix setup, some options cannot be overridden by a client unless the client's user is considered trusted. Currently, if an untrusted user tries to override one of those options, we are silently ignoring it. This can be pretty confusing in certain situations. e.g. a user thinks he disabled the sandbox when in reality he did not. We are now sending a warning message letting know the user some options have been ignored. Related to #1761.
This commit is contained in:
parent
fb0ad898ed
commit
9e0f5f803f
1 changed files with 1 additions and 1 deletions
|
@ -574,7 +574,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
||||||
else if (setSubstituters(settings.extraSubstituters))
|
else if (setSubstituters(settings.extraSubstituters))
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
debug("ignoring untrusted setting '%s'", name);
|
warn("ignoring the user-specified setting '%s', because it is a restricted setting and you are not a trusted user.", name);
|
||||||
} catch (UsageError & e) {
|
} catch (UsageError & e) {
|
||||||
warn(e.what());
|
warn(e.what());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue