Displaying 20 results from an estimated 32 matches for "set_socket_create_context".
2013 May 16
1
[PATCH] Fix compiler warning when libselinux is not present
...(+)
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 4588602..10a4d2c 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -138,7 +138,10 @@ static int make_drive_priv (guestfs_h *g, struct drive *drv, const char *selinux
static void drive_free_priv (void *);
static void set_socket_create_context (guestfs_h *g);
static void clear_socket_create_context (guestfs_h *g);
+
+#if HAVE_LIBSELINUX
static void selinux_warning (guestfs_h *g, const char *func, const char *selinux_op, const char *data);
+#endif
static int
launch_libvirt (guestfs_h *g, const char *libvirt_uri)
@@ -1716,6 +1719,7 @...
2015 Sep 10
1
[PATCH] launch: libvirt: Better error when bridge / virbr0 doesn't exist (RHBZ#1262127).
...nged, 47 insertions(+)
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 1c0bfac..d4c4c47 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -181,6 +181,7 @@ static int is_blk (const char *path);
static void ignore_errors (void *ignore, virErrorPtr ignore2);
static void set_socket_create_context (guestfs_h *g);
static void clear_socket_create_context (guestfs_h *g);
+static int check_bridge_exists (guestfs_h *g, const char *brname);
#if HAVE_LIBSELINUX
static void selinux_warning (guestfs_h *g, const char *func, const char *selinux_op, const char *data);
@@ -393,6 +394,9 @@ launch_lib...
2018 Nov 02
2
guestfs_launch() fails when C application is started as a systemd service
...t disk
usage from a libvirt domain. It works when ran manually as root, but fails
when started as a systemd service.
I'm attaching the service file, source code and verbose logs from both the
successful manual run and from the service journal.
SELinix is disabled.
Error messages:
libguestfs: set_socket_create_context: getcon failed: (none): Invalid
argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
Invalid argument [you can ignore this message if you are not using SELinux
+ sVirt]
libguestfs: error: chown: /tmp/libg...
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
...-libvirt.c
+++ b/src/launch-libvirt.c
@@ -397,7 +397,6 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
*/
snprintf (data->guestfsd_path, sizeof 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_...
2018 Nov 02
0
Re: guestfs_launch() fails when C application is started as a systemd service
...when ran manually as root, but fails
> when started as a systemd service.
>
> I'm attaching the service file, source code and verbose logs from both the
> successful manual run and from the service journal.
>
> SELinix is disabled.
>
> Error messages:
> libguestfs: set_socket_create_context: getcon failed: (none): Invalid
> argument [you can ignore this message if you are not using SELinux + sVirt]
> libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
> Invalid argument [you can ignore this message if you are not using SELinux
> + sVirt]
> libguestfs...
2019 May 24
0
[PATCH 2/2] launch: libvirt: fix custom hypervisor check
...s_h *g, const char *fs, ...) __attribute__((format (printf,2,3)));
-static int is_custom_hv (guestfs_h *g);
+static int is_custom_hv (guestfs_h *g, struct backend_libvirt_data *data);
static int is_blk (const char *path);
static void ignore_errors (void *ignore, virErrorPtr ignore2);
static void set_socket_create_context (guestfs_h *g);
@@ -606,7 +606,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
params.appliance_index = g->nr_drives;
strcpy (params.appliance_dev, "/dev/sd");
guestfs_int_drive_name (params.appliance_index, ¶ms.appliance_dev[7]);
- params.ena...
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
...guestfsd_path, sizeof data->guestfsd_path,
> - "%s/guestfsd.sock", g->tmpdir);
> + if (guestfs_int_create_socketname (g, "guestfsd.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);
> +...
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
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...*/
- snprintf (data->guestfsd_path, sizeof data->guestfsd_path,
- "%s/guestfsd.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "guestfsd.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,...
2018 Dec 06
0
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
...EN]; /* random name */
bool is_kvm; /* false = qemu, true = kvm (from capabilities)*/
struct version libvirt_version; /* libvirt version */
@@ -167,7 +166,6 @@ static int is_blk (const char *path);
static void ignore_errors (void *ignore, virErrorPtr ignore2);
static void set_socket_create_context (guestfs_h *g);
static void clear_socket_create_context (guestfs_h *g);
-static int check_bridge_exists (guestfs_h *g, const char *brname);
#if HAVE_LIBSELINUX
static void selinux_warning (guestfs_h *g, const char *func, const char *selinux_op, const char *data);
@@ -448,17 +446,8 @@ launch_li...
2013 Feb 28
7
[PATCH 0/7] Fix SELinux security contexts so we can access shared disks (RHBZ#912499).
https://bugzilla.redhat.com/show_bug.cgi?id=912499
(especially comments 7 & 10)
This patch set is the final fix so that we can access disks in use by
other guests when SELinux and sVirt are enabled.
Previously such disks were inaccessible because sVirt labels the disks
with a random SELinux label to prevent other instances of qemu from
being able to read them. So naturally the libguestfs
2020 Jul 22
1
回复: 回复: bug report
...', fmt=qcow2 size=4294967296 backing_file='/var/tmp/.guestfs-0/appliance.d/root' backing_fmt='raw' encryption=off cluster_size=65536 lazy_refcounts=off
libguestfs: trace: disk_create = 0
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: set_socket_create_context: getcon failed: (none): Invalid argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL: Invalid argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: create libvirt XML
libg...
2018 Dec 06
2
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
Let's actually compile and test the patch this time, rather than
trusting the RHEL 7.6 patch to apply directly to head ...
Rich.
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
...*/
- snprintf (data->guestfsd_path, sizeof data->guestfsd_path,
- "%s/guestfsd.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "guestfsd.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,...
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
...*/
- snprintf (data->guestfsd_path, sizeof data->guestfsd_path,
- "%s/guestfsd.sock", g->tmpdir);
+ if (guestfs_int_create_socketname (g, "guestfsd.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,...
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...guestfsd_path, sizeof data->guestfsd_path,
> - "%s/guestfsd.sock", g->tmpdir);
> + if (guestfs_int_create_socketname (g, "guestfsd.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);
> +...
2016 Apr 07
2
Help: Is it possible to use libguestfs in Xen guest OS
...ng_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsqw6Xky/overlay2
Formatting '/tmp/libguestfsqw6Xky/overlay2', fmt=qcow2 size=4294967296
backing_file='/var/tmp/.guestfs-0/appliance.d/root' backing_fmt='raw'
encryption=off cluster_size=65536 lazy_refcounts=off
libguestfs: set_socket_create_context: context_new failed: kernel: Invalid
argument [you can ignore this UNLESS using SELinux + sVirt]
libguestfs: [00031ms] create libvirt XML
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2200086
libguestfs: libvirt XML:\n<?xml...
2016 Aug 29
2
Re: guestfs_launch gets stuck
...: \ /tmp/libguestfsWmxUbv/overlay1
Formatting '/tmp/libguestfsWmxUbv/overlay1', fmt=qcow2 size=4294967296
backing_file='/var/tmp/.guestfs-0/appliance.d/root' backing_fmt='raw'
encryption=off cluster_size=65536 lazy_refcounts=off
libguestfs: trace: disk_create = 0
libguestfs: set_socket_create_context: context_new failed: kernel: Invalid
argument [you can ignore this UNLESS using SELinux + sVirt]
libguestfs: [62889ms] create libvirt XML
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2394042
libguestfs: trace: get_cachedir
li...
2018 Nov 07
2
Re: guestfs_launch() fails when C application is started as a systemd service
...when started as a systemd service.
> >
> > I'm attaching the service file, source code and verbose logs from both
> the
> > successful manual run and from the service journal.
> >
> > SELinix is disabled.
> >
> > Error messages:
> > libguestfs: set_socket_create_context: getcon failed: (none): Invalid
> > argument [you can ignore this message if you are not using SELinux +
> sVirt]
> > libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
> > Invalid argument [you can ignore this message if you are not using
> SELinux
>...