| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The read_all function is used as a callback for
guestfs___cmd_set_stdout_callback (cmd, read_all, [str],
CMD_STDOUT_FLAG_WHOLE_BUFFER);
As noted in the documentation for CMD_STDOUT_FLAG_WHOLE_BUFFER, the
buffer returned is not \0-terminated, and so using memdup will create
an unterminated string, and therefore potentially a memory overrun
when reading or searching the string.
Use strndup instead so the final string is \0-terminated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to get the host's loops_per_jiffy value and pass this on the
command line to the guest. In theory this should avoid the appliance
having to recalculate this value in a VM with TCG (which is generally
error-prone). This should avoid timing issues.
We only do this when we are certain that the guest will be TCG.
Currently we only have enough information to do this from the libvirt
attach-method. So mostly this will only affect people using Fedora in
a VM.
The host loops_per_jiffy value is not exported by the kernel. It is
only printed by the kernel early during boot, so if boot messages have
"scrolled off" the kernel ring buffer, it won't be available. Some
operating systems save early kernel messages in /var/log/dmesg but (a)
Fedora 18+ seem to have abandoned this file and (b) on Ubuntu this
file is unreadable for spurious "security" reasons.
I have submitted a patch to make lpj available through /proc/cpuinfo.
|
|
|
|
| |
This is just code motion.
|
|
|
|
|
|
|
| |
lua 5.2 changed API, LUA_GLOBALSINDEX is no longer available.
http://www.lua.org/manual/5.2/manual.html#8.3
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
| |
|
|
|
|
|
| |
The lvresize command unnecessarily gives an error if you don't
change the size of the LV. Suppress this error.
|
| |
|
|
|
|
| |
Move this into a common file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following memory leak found by valgrind:
==13629== 498 (112 direct, 386 indirect) bytes in 1 blocks are definitely lost in loss record 99 of 110
==13629== at 0x4A06B2F: calloc (vg_replace_malloc.c:593)
==13629== by 0x4CA564E: guestfs_safe_calloc (alloc.c:71)
==13629== by 0x4CA9B02: guestfs___new_command (command.c:143)
==13629== by 0x4CA66E9: guestfs___build_appliance (appliance.c:690)
==13629== by 0x4CBD1B9: launch_libvirt (launch-libvirt.c:188)
==13629== by 0x402E7E: main (virt-filesystems.c:349)
Also adjust the command code in several places to make it simpler. We
can almost always call guestfs___cmd_close right after
guestfs___cmd_run, avoiding any need to close the handle along error
paths.
Tested by running the test suite under valgrind.
|
|
|
|
|
|
| |
This adds the following new APIs:
- cap_get_file
- cap_set_file
|
|
|
|
|
|
|
| |
This adds the following new APIs:
- acl_get_file
- acl_set_file
- acl_delete_def_file
|
|
|
|
|
|
|
|
|
| |
Because the shell script was missing a space, the final output test
was failing, although for some reason this didn't cause the whole test
to fail.
Fixing the missing space also revealed a bug in the test output, which
is also fixed.
|
|
|
|
|
|
|
|
|
|
| |
Remove the kdump generated kernel crash data.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Added /var/log/dump/* path for SLES (thanks Olaf Hering).
- Update po/POTFILES-ml.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
See comment.
|
|
|
|
| |
It's not relevant, since the memory leak begins in libvirt.
|
|
|
|
|
| |
This is just code motion. It just ensures there is no possible
conflict with lua_* symbols.
|
|
|
|
| |
This includes a test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
See http://article.gmane.org/gmane.comp.lang.lua.general/95065
Note that this is incompatible with existing code. You
have to do:
local G = require "guestfs"
local g = G.create ()
ie. give the module your own name ("G" in that example).
|
| |
|
|
|
|
| |
Thanks Jerome Vuarand.
|
| |
|
|
|
|
|
|
| |
This is faster, but more importantly it avoids the strange error
'lua: attempt to index a string value' which appears with (some)
single element lists.
|
| |
|
| |
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=872831
and https://bugzilla.redhat.com/show_bug.cgi?id=865961
|
|
|
|
| |
Use luaL_checkoption which is designed for this purpose.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- add support for events (with test)
- test progress messages
- update documentation to describe events
- refactor handle closing code
- refactor error code
- use 'assert' in test code instead of 'if ... then error end'
|
| |
|
| |
|
| |
|
|
|
|
| |
Use %s + strerror as a replacement.
|
|
|
|
|
|
|
|
| |
- Remove default error handler.
- User cancel.
- Add the errno to the object which is thrown on error.
Still no events.
|
| |
|
|
|
|
|
|
|
|
| |
These are relatively complete, although only lightly tested. Missing:
- events
- last_errno
- user_cancel
|
| |
|
| |
|
|
|
|
| |
(RHBZ#852194).
|
|
|
|
| |
Thanks Steve Grubb.
|
|
|
|
|
|
|
| |
Also various fixes:
- remove fixed-size buffer
- change if (err) free (err) -> free (err).
|