Commit Graph

6792 Commits

Author SHA1 Message Date
Doug Goldstein
fa4732724e docs: updates to CA cert and client cert/key info
Update the documentation to mention that the CA certificate and the
client cert/key pair can come from the user's location or the global
location independent of each other.

Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
2011-05-10 14:56:53 -06:00
Doug Goldstein
343c69dbad virsh: flexibility in CA cert and user cert/key
Allow the CA certificate to come from the user's home directory or from
the global location independently of the client certificate/key pair.

Mostly for the case when each user on a system has their own cert/key
pair but the system as a whole shares the same CA.

Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
2011-05-10 14:45:09 -06:00
Matthias Bolte
8c6df9139b remote generator: Make parsing stricter
Anchor matches at the beginning of a line.

Specialize some general matches.

Add some comments to special cases.
2011-05-10 20:51:26 +02:00
Matthias Bolte
bfb188dd44 remote generator: Unify unsigned int notation in .x files
Rename u_int and unsigned to unsigned int. This gets rid of some special
case code in the generator.
2011-05-10 20:47:24 +02:00
Matthias Bolte
e4f6e1230d remote generator: Fix comment ignoring regex 2011-05-10 20:36:13 +02:00
Matthias Bolte
9817604afc Rename internal DumpXML functions to GetXMLDesc
This matches the public API and helps to get rid of some special
case code in the remote generator.

Rename driver API functions and XDR protocol structs.

No functional change included outside of the remote generator.
2011-05-10 20:32:41 +02:00
Lai Jiangshan
fcf967f2ad qemu,inject-nmi: Implement the driver methods 2011-05-10 11:40:51 -06:00
Lai Jiangshan
a083d44c87 inject-nmi: Expose the new API in virsh 2011-05-10 11:40:51 -06:00
Lai Jiangshan
b8c776eb63 inject-nmi: Implementing the remote protocol 2011-05-10 11:40:51 -06:00
Lai Jiangshan
9a1b5dc66f inject-nmi: Implementing the public API 2011-05-10 11:40:51 -06:00
Lai Jiangshan
b19bd85e15 inject-nmi: Defining the internal API 2011-05-10 11:40:51 -06:00
Lai Jiangshan
b08ad6cd87 inject-nmi: Defining the public API 2011-05-10 11:40:51 -06:00
Cole Robinson
0ed4aa448e lxc: container: Build init cmd before we close stdout
That way we can log the 'init' argv for debugging.
2011-05-10 13:15:50 -04:00
Cole Robinson
0719c3d64c lxc: container: Convert <init> exec to virCommand 2011-05-10 13:15:50 -04:00
Cole Robinson
f095398a47 command: Add virCommandExec helper
Actually execs the argv/env we've generated, replacing the current process.
Kind of has a limited usage, but allows us to use virCommand in LXC
driver to launch the 'init' process
2011-05-10 13:15:50 -04:00
Cole Robinson
924eb9a4b4 lxc: driver: Improve logging when launching emulator
Log the full command line and a timestamp like we do for QEMU
2011-05-10 13:15:50 -04:00
Cole Robinson
451cfd05a2 lxc: driver: Convert emulator launching to virCommand
v2:
    Shorten a few virCommand calls
    s/remain/retain/
2011-05-10 13:15:50 -04:00
Cole Robinson
35c1b35e25 command: Add virCommandEnvAddFormat
Similar to virCommandArgAddFormat. We will use this shortly.

v2:
    Convert virCommandEnvAddPair to use the new function
2011-05-10 13:15:50 -04:00
Matthias Bolte
fc0ab50abd Fix two uninitialized variable warnings
gcc only reports them when compiling with -O3.
2011-05-10 08:39:56 +02:00
Matthias Bolte
ebea59ad82 apparmor: Fix uninitalized variable warning in virt-aa-helper 2011-05-10 08:03:31 +02:00
Eric Blake
9d8e01a1db build: translate generated strings
Make sure that xgettext scans generated files for translatable
strings, rather than just files stored in libvirt.git.

* .gnulib: Update, for bootstrap and syntax-check fixes.
* bootstrap: Resynchronize with gnulib.
* cfg.mk (generated_files): Define.
* po/POTFILES.in: Add more files with _().
2011-05-09 11:51:05 -06:00
Daniel P. Berrange
8b83cc4219 Remove bogus assert() from migration code
assert() is forbidden in libvirt code, and these two cases would
in fact never execute due to earlier error checks.

* src/libvirt.c: Remove assert() usage
2011-05-09 17:59:04 +01:00
Daniel P. Berrange
604708df27 Pull in gnulib fnmatch module
The libvirtd daemon uses fnmatch. Although we don't yet build
it on Win32, we should use gnulib's fnmatch module to ensure
portability to all platforms.

* bootstrap.conf: Add fnmatch
2011-05-09 16:10:46 +01:00
Jiri Denemark
b9171eba2f json: Fix *GetBoolean functions
They were not used anywhere so far so nobody noticed they are broken.
2011-05-09 14:02:13 +02:00
Eric Blake
0f536dea9b build: rebuild generated files after rpcgen_fix.pl tweak
Noticed this while trying to run rpcgen on cygwin.

* src/Makefile.am ($(srcdir)/remote/%_protocol.h)
($(srcdir)/remote/%_protocol.c): Add a dependency.
2011-05-09 14:02:13 +02:00
Eric Blake
3e63a94cb9 build: fix VPATH builds
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Generated files
should live in $(srcdir). Update rules to reflect this.
2011-05-09 14:02:13 +02:00
Daniel Veillard
c7ac48c7d7 Re-add libvirt.spec to tarball to allwo "make rpm"
Commit e6972165 broke "make rpm" and rpmbuild -ta tarball
2011-05-09 14:23:19 +08:00
Daniel P. Berrange
3496b7f500 build: Remove all generated RPC files from GIT
Stop storing the generated files for the remote protocol client
and server in source control. The generated files will still be
included in the result of 'make dist' to avoid end-users needing
to generate the files

Signed-off-by: Eric Blake <eblake@redhat.com>

Unfortunately, this means that the strings marked for translation
in generated files are not picked up by gnulib's syntax-check,
I'm working on fixing that in gnulib.

* .gitignore, cfg.mk, po/POTFILES.in: Reflect deletion.
2011-05-06 16:22:33 -06:00
Daniel P. Berrange
fb1e8d9c44 build: refactor generated RPC files
Always generate the rpc files, and require rpcgen during bootstrap.

* daemon/Makefile.am: Removed generated files with
  maintainer-clean target
* src/Makefile.am: Removed generated files with
  maintainer-clean target. Always run 'rpcgen' if
  generated files are missing
2011-05-06 16:18:31 -06:00
Eric Blake
d3c5104dda build: rename generated files to .h, for automake's sake
In preparation for removing generated files, it is necessary
to tell automake that the generated files must be distributed
but not directly compiled (since they are included into the
body of a larger .c file that is compiled).  Hence, even though
these files are code and not headers in the strict sense of
the word, it is easier to rename them to .h for automake's sake.

* daemon/remote_client_bodies.c: Rename to .h.
* daemon/qemu_client_bodies.c: Likewise.
* src/remote/remote_client_bodies.c: Likewise.
* src/remote/qemu_client_bodies.c: Likewise.
* daemon/Makefile.am (remote_dispatch_bodies.c)
(qemu_dispatch_bodies.c): Rename to .h.
(remote.c, EXTRA_DIST): Reflect rename.
* daemon/remote.c: Likewise.
* daemon/remote_generator.pl: Likewise.
* src/Makefile.am (remote/remote_driver.c): Likewise.
* src/remote/remote_driver.c: Likewise.
* po/POTFILES.in: Likewise.
* cfg.mk (exclude_file_name_regexp--sc_require_config_h)
(exclude_file_name_regexp--sc_require_config_h_first)
(exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF):
Likewise.
2011-05-06 15:11:36 -06:00
Matthias Bolte
15b64ef0ed remote generator, client: Handle arguments with limited length
This adds length checks to all affected functions.
2011-05-06 20:27:29 +02:00
Matthias Bolte
b5041a49ec remote generator, client: Handle functions that return lists 2011-05-06 20:27:27 +02:00
Matthias Bolte
8921799aae remote: Refactor remote*Open and remote*Close functions
Add generic versions of the open and close functions and call them.
2011-05-06 20:27:26 +02:00
Matthias Bolte
58b6a5c49e remote generator, client: Handle functions with optional return values 2011-05-06 20:27:24 +02:00
Matthias Bolte
abd05a07ae remote generator, client: Handle functions with multiple return values 2011-05-06 20:27:22 +02:00
Matthias Bolte
a1c891ec1e remote generator, client: Handle functions with wrapped return values 2011-05-06 20:27:20 +02:00
Matthias Bolte
9de503f957 remote generator, client: Handle functions with simple return values 2011-05-06 20:27:18 +02:00
Matthias Bolte
f68bb4edb3 remote generator, client: Handle simple remote driver functions
Rename remoteSecretListSecrets to remoteListSecrets to match the normal
naming pattern.
2011-05-06 20:26:21 +02:00
Matthias Bolte
2c4105f112 remote generator: Reorder into prepare and print section 2011-05-06 20:09:50 +02:00
Matthias Bolte
6384104bcc remote generator, daemon: Handle functions with multiple return values
Once again rename members in the XDR definitions to avoid special case
code in the generator.
2011-05-06 20:08:36 +02:00
Matthias Bolte
38982f18f2 remote generator, daemon: Combine multiple ifs in the generated code 2011-05-06 20:08:34 +02:00
Matthias Bolte
5641222eba remote generator, daemon: Handle the CPU functions
They require additional special cases.
2011-05-06 20:08:31 +02:00
Matthias Bolte
900b18f47b remote generator: Refactor duplicate code 2011-05-06 20:08:29 +02:00
Matthias Bolte
33148050e7 remote generator, daemon: Handle functions that return lists 2011-05-06 20:08:27 +02:00
Matthias Bolte
705519d8e9 remote: Rename 'nameslen' to the common 'maxnames'
Avoids special case handling in the remote generator.
2011-05-06 20:08:25 +02:00
Matthias Bolte
9a74649cd2 remote generator, daemon: Handle functions with optional arguments 2011-05-06 20:08:23 +02:00
Matthias Bolte
0411030665 remote generator, daemon: Handle more functions
This covers functions that return single wrapped objects and don't
involve complexer code in the body.
2011-05-06 20:08:21 +02:00
Matthias Bolte
0c3cea0bd6 remote generator, daemon: Handle simple-return-value functions 2011-05-06 20:07:39 +02:00
Matthias Bolte
0fb79ff4bb remote generator, daemon: Change capitalization of some words
Again this will simplify the generator, due to less special case handling.
2011-05-06 20:05:01 +02:00
Matthias Bolte
37cb0882b5 remote: Replace 'domain' with 'dom' in the XDR protocol
This simplifies the remote protocol code generator.

Also rename 'ret' to 'result' to resolve a naming conflict in the
generator.
2011-05-06 20:05:00 +02:00