提交 51bcb09f 编写于 作者: D Daniel P. Berrange

Reject any non-option command line arguments

Due to a bug in editing /etc/sysconfig/libvirtd, VDSM was causing
libvirt processes to run with the following command line args

   /usr/sbin/libvirtd --listen '#' 'by vdsm'

While it correctly rejects any invalid option flags, libvirtd
was not rejecting any non-option command line arguments

* daemon/libvirtd.c: Reject non-option argv
上级 a8c0b2fe
......@@ -999,6 +999,12 @@ int main(int argc, char **argv) {
}
}
if (optind != argc) {
fprintf(stderr, "%s: unexpected, non-option, command line arguments\n",
argv[0]);
exit(EXIT_FAILURE);
}
if (!(config = daemonConfigNew(privileged))) {
VIR_ERROR(_("Can't create initial configuration"));
exit(EXIT_FAILURE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册