// signer - trust the specified servers as module signers
// revoke - revoke the requested trust
// all-users - apply/revoke the requested trust for all users
+ // no-prompt - don't prompt the user for confirmation
vector<string>components;
tokenize (s.server_trust_spec, components, ",");
bool ssl = false;
bool revoke = false;
bool all_users = false;
bool error = false;
+ bool no_prompt = false;
for (vector<string>::const_iterator i = components.begin ();
i != components.end ();
++i)
else
all_users = true;
}
+ else if (*i == "no-prompt")
+ no_prompt = true;
else
cerr << "Warning: Unrecognized server trust specification: " << *i
<< endl;
}
// Prompt the user to confirm what's about to happen.
- if (revoke)
- clog << "Revoke trust ";
+ if (no_prompt)
+ {
+ if (revoke)
+ clog << "Revoking trust ";
+ else
+ clog << "Adding trust ";
+ }
else
- clog << "Add trust ";
- clog << "in the following servers " << trustString.str () << '?' << endl;
+ {
+ if (revoke)
+ clog << "Revoke trust ";
+ else
+ clog << "Add trust ";
+ }
+ clog << "in the following servers " << trustString.str ();
+ if (! no_prompt)
+ clog << '?';
+ clog << endl;
for (unsigned i = 0; i < limit; ++i)
clog << " " << server_list[i] << endl;
- clog << "[y/N] " << flush;
-
- // Only carry out the operation if the response is "yes"
- string response;
- cin >> response;
- if (response[0] != 'y' && response [0] != 'Y')
+ if (! no_prompt)
{
- clog << "Server trust unchanged" << endl;
- return;
+ clog << "[y/N] " << flush;
+
+ // Only carry out the operation if the response is "yes"
+ string response;
+ cin >> response;
+ if (response[0] != 'y' && response [0] != 'Y')
+ {
+ clog << "Server trust unchanged" << endl;
+ return;
+ }
}
// Now add/revoke the requested trust.
the \-d option. Caution: this can make the probe modules considerably
larger.
.TP
-.BI \-\-all-modules
+.BI \-\-all\-modules
Equivalent to specifying "-dkernel" and a "-d" for each kernel module that is
currently loaded. Caution: this can make the probe modules considerably
larger.
.TP
.BI revoke
revoke the specified trust. The default is to grant it.
+.TP
+.BI no\-prompt
+do not prompt the user for confirmation before carrying out the requested
+action. The default is to prompt the user for confirmation.
.RE
If no argument is provided, then the default is
.IR \-\-use\-server ,
then no trust will be granted or revoked.
-The user will be prompted to confirm the trust to be granted or revoked before
+Unless \fBno\-prompt\fR has been specified,
+the user will be prompted to confirm the trust to be granted or revoked before
the operation is performed.
.SH ARGUMENTS