Displaying 19 results from an estimated 19 matches for "console_path".
2016 Jan 29
7
[PATCH 1/6] launch: unix: check for length of sockets
Error out early if the path to the socket will not fit into
sockaddr_un::sun_path, as we will not be able to connect to it.
---
src/launch-unix.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/launch-unix.c b/src/launch-unix.c
index 740c554..973e14b 100644
--- a/src/launch-unix.c
+++ b/src/launch-unix.c
@@ -47,6 +47,12 @@ launch_unix (guestfs_h *g, void *datav, const char
2016 Jan 29
0
[PATCH 5/6] launch: libvirt: cleanup sockets on shutdown
...data->guestfsd_path,
"%s/guestfsd.sock", g->tmpdir);
- unlink (data->guestfsd_path);
set_socket_create_context (g);
@@ -424,7 +423,6 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
/* For the serial console. */
snprintf (data->console_path, sizeof data->console_path,
"%s/console.sock", g->tmpdir);
- unlink (data->console_path);
console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0);
if (console_sock == -1) {
@@ -2027,6 +2025,16 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_fo...
2017 Mar 14
1
[PATCH] lib: libvirt: If root, run qemu as root.root.
...ockets that are
- * owned by root.qemu with mode 0660 and hence accessible to qemu.
- */
- struct group *grp;
-
- if (chmod (data->guestfsd_path, 0660) == -1) {
- perrorf (g, "chmod: %s", data->guestfsd_path);
- goto cleanup;
- }
-
- if (chmod (data->console_path, 0660) == -1) {
- perrorf (g, "chmod: %s", data->console_path);
- goto cleanup;
- }
-
- grp = getgrnam ("qemu");
- if (grp != NULL) {
- if (chown (data->guestfsd_path, 0, grp->gr_gid) == -1) {
- perrorf (g, "chown: %s", data->...
2018 May 21
2
[PATCH for discussion only] lib: libvirt: If root, run qemu subprocess as root.root.
libvirt doesn't have a concept of "session qemu" for root:
https://bugzilla.redhat.com/show_bug.cgi?id=890291
When a libguestfs-using process runs as root, and libvirt runs a qemu
subprocess, the qemu subprocess is run as a non-root user (typically
qemu.qemu). This causes various problems, for example if we try to
open a file which is readable by root but unreadable by qemu.qemu
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
...&data->guestfsd_path) == -1)
> + goto cleanup;
>
> set_socket_create_context (g);
>
> @@ -421,8 +422,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
> }
>
> /* For the serial console. */
> - snprintf (data->console_path, sizeof data->console_path,
> - "%s/console.sock", g->tmpdir);
> + if (guestfs_int_create_socketname (g, "console.sock",
> + &data->console_path) == -1)
> + goto cleanup;
>
> console_sock = so...
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...estfsd.sock",
+ &data->guestfsd_path) == -1)
+ goto cleanup;
set_socket_create_context (g);
@@ -421,8 +422,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
}
/* For the serial console. */
- snprintf (data->console_path, sizeof data->console_path,
- "%s/console.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "console.sock",
+ &data->console_path) == -1)
+ goto cleanup;
console_sock = socket (AF_UNIX, SOCK_STREAM|SOC...
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
...estfsd.sock",
+ &data->guestfsd_path) == -1)
+ goto cleanup;
set_socket_create_context (g);
@@ -421,8 +422,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
}
/* For the serial console. */
- snprintf (data->console_path, sizeof data->console_path,
- "%s/console.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "console.sock",
+ &data->console_path) == -1)
+ goto cleanup;
console_sock = socket (AF_UNIX, SOCK_STREAM|SOC...
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
...estfsd.sock",
+ &data->guestfsd_path) == -1)
+ goto cleanup;
set_socket_create_context (g);
@@ -421,8 +422,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
}
/* For the serial console. */
- snprintf (data->console_path, sizeof data->console_path,
- "%s/console.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "console.sock",
+ &data->console_path) == -1)
+ goto cleanup;
console_sock = socket (AF_UNIX, SOCK_STREAM|SOC...
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...&data->guestfsd_path) == -1)
> + goto cleanup;
>
> set_socket_create_context (g);
>
> @@ -421,8 +422,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
> }
>
> /* For the serial console. */
> - snprintf (data->console_path, sizeof data->console_path,
> - "%s/console.sock", g->tmpdir);
> + if (guestfs_int_create_socketname (g, "console.sock",
> + &data->console_path) == -1)
> + goto cleanup;
>
> console_sock = so...
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...}
#endif
@@ -1345,7 +1282,7 @@ construct_libvirt_xml_devices (guestfs_h *g,
attribute ("type", "unix");
start_element ("source") {
attribute ("mode", "connect");
- attribute ("path", params->data->console_path);
+ attribute ("path", "%s", params->data->console_path);
} end_element ();
start_element ("target") {
attribute ("port", "0");
@@ -1359,7 +1296,7 @@ construct_libvirt_xml_devices (guestfs_h *g,
attribute (...
2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has
evolved over a long time without any particular direction, and the
result is, to say the least, not very organized.
These patches take a first step at cleaning up the mess by abstracting
out socket operations from the rest of the code. The purpose of this
is to allow us to slot in a different connection layer under the
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros.
Rich.
2020 Jan 16
7
[PATCH 0/4] Use libvirt firmware autoselection
Starting with 5.2.0, libvirt has a way to select the firmware by
specifying its type, provided configuration files for the firmware are
shipped. Currently we start the appliance as UEFI if any of the firmware
are found, so instead we can try to just set the firmware type iff:
- the libvirt autoselection works
- the 'efi' firmware is available
The only behaviour change is that the default
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html
However it was broken in a few ways. First of all the documentation
was broken because "/**" enhanced comments were not permitted on
macros. This is fixed in the new 1/4 patch.
Secondly we didn't use single_element() everywhere possible, which
is fixed in the new 4/4 patch.
Lastly I've
2019 May 24
3
[PATCH 0/2] libvirt: fix check of custom QEMU
In case you configure libguestfs with a custom QEMU, e.g.:
$ ./configure [...] QEMU=/path/to/qemu
then the libvirt backend did not use to override it, launching the
appliance with the default QEMU for libvirt.
This does not change the manual emulator overriding using set-hv.
Pino Toscano (2):
launch: libvirt: get default QEMU from domcapabilities
launch: libvirt: fix custom hypervisor
2017 May 17
7
[PATCH 1/5] s390x: launch: libvirt: Use <console> device sclp for appliance debug messages (RHBZ#1376547).
...domain.html#elementCharConsole
+ */
+ start_element ("console") {
+ attribute ("type", "unix");
+ start_element ("source") {
+ attribute ("mode", "connect");
+ attribute ("path", params->data->console_path);
+ } end_element ();
+ start_element ("target") {
+ attribute ("type", "sclp");
+ attribute ("port", "0");
+ } end_element ();
+ } end_element ();
+#endif
/* Virtio-serial for guestfsd communication. */
start_el...
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap)
support. This will allow us to change virt-sparsify to work on disk
images in-place (instead of using slow & inefficient copying).
The approach used is to add an optional 'discard' parameter to
add-drive. It has 3 possible settings:
- 'disable' : the default, no discard is done
- 'besteffort' :
2014 Nov 04
13
[PATCH 0/9] Small bits of non-Linux porting - #2
Hi,
continuing what started a couple of weeks ago [1], the attached patch
series continues the work in making it easier to build and run
libguestfs (in fixed appliance mode) on OSes different than Linux.
The provided changes should cause no functional changes on Linux.
[1] https://www.redhat.com/archives/libguestfs/2014-October/msg00176.html
Thanks,
--
Pino
Pino Toscano (9):
build: check
2014 Mar 11
21
[PATCH v2 00/18] Add discard support.
This still isn't working at the moment. See:
http://marc.info/?t=139457409300003&r=1&w=2
This set of patches:
- Adds new APIs to support discard in libguestfs.
- Adds discard support to virt-format.
- Adds discard support to virt-sysprep.
- Implements virt-sparsify --in-place.
Rich.