Skip to content

Commit

Permalink
ATOR-190 - Fail fast on terms disagreement (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
yumirkov committed Sep 23, 2024
1 parent be8d968 commit 5f76de5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -4616,7 +4616,8 @@ options_init_from_torrc(int argc, char **argv)
}

if (!get_options_mutable()->AgreeToTerms && (argeement == NULL || strcmp(argeement, "agreed") != 0)) {
if (get_options_mutable()->RunAsDaemon) {
if (get_options_mutable()->RunAsDaemon || !isatty(STDIN_FILENO)) { // Non-interactive mode: Fail fast
log_err(LD_CONFIG, "User has not agreed to the terms and conditions. Exiting.");
tor_asprintf(&errmsg, "Not agreed to terms");
retval = -1;
goto err;
Expand Down

0 comments on commit 5f76de5

Please sign in to comment.