+- ``--no-pkttyagent``
+
+Do not register ``pkttyagent`` as authentication agent with the
+polkit system daemon, even if ``virsh`` has been started from a
+terminal.
+
+
+
- ``-v``, ``--version[=short]``
Ignore all other arguments, and prints the version of the libvirt library
keepalive_forced = true;
}
- if (virPolkitAgentAvailable() &&
+ if (!ctl->no_pkttyagent &&
+ virPolkitAgentAvailable() &&
!(pkagent = virPolkitAgentCreate()))
virResetLastError();
" -q | --quiet quiet mode\n"
" -r | --readonly connect readonly\n"
" -t | --timing print timing information\n"
+ " --no-pkttyagent suppress registration of pkttyagent\n"
" -v short version\n"
" -V long version\n"
" --version[=TYPE] version, TYPE is short or long (default short)\n"
{ "quiet", no_argument, NULL, 'q' },
{ "readonly", no_argument, NULL, 'r' },
{ "timing", no_argument, NULL, 't' },
+ { "no-pkttyagent", no_argument, NULL, 0 },
{ "version", optional_argument, NULL, 'v' },
{ NULL, 0, NULL, 0 },
};
case 'V':
virshShowVersion(ctl);
exit(EXIT_SUCCESS);
+ case 0:
+ if (STREQ(opt[longindex].name, "no-pkttyagent")) {
+ ctl->no_pkttyagent = true;
+ break;
+ } else {
+ vshError(ctl, "%s", _("unknown option"));
+ exit(EXIT_FAILURE);
+ }
case ':':
for (i = 0; opt[i].name != NULL; i++) {
if (opt[i].val == optopt)
bool imode; /* interactive mode? */
bool quiet; /* quiet mode */
bool timing; /* print timing info? */
+ bool no_pkttyagent; /* suppress registration of pkttyagent? */
int debug; /* print debug messages? */
char *logfile; /* log file name */
int log_fd; /* log file descriptor */