search for: guestfs_get_tmpdir

Displaying 20 results from an estimated 94 matches for "guestfs_get_tmpdir".

2014 Jul 28
5
[PATCH] make-fs: respect libguestfs' temporary dir
...-fs.c b/make-fs/make-fs.c index 1bec3e2..9c11fef 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -381,8 +381,9 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn) CLEANUP_FCLOSE FILE *fp = NULL; char line[256]; size_t len; + CLEANUP_FREE char *tmpdir = guestfs_get_tmpdir (g); - if (asprintf (&tmpfile, "/tmp/makefsXXXXXX") == -1) { + if (asprintf (&tmpfile, "%s/makefsXXXXXX", tmpdir) == -1) { perror ("asprintf"); return -1; } -- 1.9.3
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets; will be useful for changing later the logic for placing sockets. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index
2016 Feb 02
0
[PATCH 3/3] New API: get-sockdir
...) + str = g->env_runtimedir; + else + str = "/tmp"; + + return safe_strdup (g, str); +} + static int lazy_make_tmpdir (guestfs_h *g, char *(*getdir) (guestfs_h *g), char **dest) { @@ -145,6 +165,12 @@ guestfs_int_lazy_make_tmpdir (guestfs_h *g) return lazy_make_tmpdir (g, guestfs_get_tmpdir, &g->tmpdir); } +int +guestfs_int_lazy_make_sockdir (guestfs_h *g) +{ + return lazy_make_tmpdir (g, guestfs_get_sockdir, &g->sockdir); +} + /* Recursively remove a temporary directory. If removal fails, just * return (it's a temporary directory so it'll eventually be c...
2016 Feb 02
0
[PATCH 2/3] lib: extract lazy tmpdir creation helper
...ot created when * the handle is created. Instead we create it lazily before the * first time it is used, or during launch. @@ -126,17 +142,7 @@ guestfs_impl_get_cachedir (guestfs_h *g) int guestfs_int_lazy_make_tmpdir (guestfs_h *g) { - if (!g->tmpdir) { - CLEANUP_FREE char *tmpdir = guestfs_get_tmpdir (g); - g->tmpdir = safe_asprintf (g, "%s/libguestfsXXXXXX", tmpdir); - if (mkdtemp (g->tmpdir) == NULL) { - perrorf (g, _("%s: cannot create temporary directory"), g->tmpdir); - free (g->tmpdir); - g->tmpdir = NULL; - return -1; - } -...
2018 Feb 07
1
[PATCH] tmpdirs: Make the ‘su broken’ error message actionable.
...right ownership."), + tmppath, (int) geteuid ()); free (tmppath); return -1; } @@ -219,13 +223,13 @@ lazy_make_tmpdir (guestfs_h *g, char *(*getdir) (guestfs_h *g), char **dest) int guestfs_int_lazy_make_tmpdir (guestfs_h *g) { - return lazy_make_tmpdir (g, guestfs_get_tmpdir, &g->tmpdir); + return lazy_make_tmpdir (g, guestfs_get_tmpdir, 0, &g->tmpdir); } int guestfs_int_lazy_make_sockdir (guestfs_h *g) { - return lazy_make_tmpdir (g, guestfs_get_sockdir, &g->sockdir); + return lazy_make_tmpdir (g, guestfs_get_sockdir, 1, &g->sockdi...
2016 Feb 03
0
[PATCH v2 2/2] New API: get-sockdir
...) + str = g->env_runtimedir; + else + str = "/tmp"; + + return safe_strdup (g, str); +} + static int lazy_make_tmpdir (guestfs_h *g, char *(*getdir) (guestfs_h *g), char **dest) { @@ -145,6 +165,12 @@ guestfs_int_lazy_make_tmpdir (guestfs_h *g) return lazy_make_tmpdir (g, guestfs_get_tmpdir, &g->tmpdir); } +int +guestfs_int_lazy_make_sockdir (guestfs_h *g) +{ + return lazy_make_tmpdir (g, guestfs_get_sockdir, &g->sockdir); +} + /* Recursively remove a temporary directory. If removal fails, just * return (it's a temporary directory so it'll eventually be c...
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets -- will be useful for changing later the logic for placing sockets. Futhermore, check that the length of sockets won't overflow the buffer for their filenames. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 17 +++++++++++++++++ 4 files changed, 27
2014 Jan 23
2
Errors Running on Ubuntu 13.10
...dir: /var/tmp guestfs_get_direct: 0 guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/lib/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_qemu: /usr/bin/qemu-system-x86_64 guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_smp: 1 guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: backend=direct libguestfs: launch: tmpdir=/tmp/libguestfsH1o0hZ libguestfs: launch: umask=0022 libguestfs: launch: euid=0 libguestfs: command: run: supermin-helper...
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...d long path? This new behaviour certainly needs to be documented, eg. in guestfs(3), because it changes an assumption that setting TMPDIR will move every temporary file that libguestfs creates. Are there machines where /tmp is unusable? Should we provide an API to read the sockname, analogous to guestfs_get_tmpdir and guestfs_get_cachedir? Should we use /run or /dev/shm instead? I would say, not /run/user because systemd doesn't reliably create it, unfortunately, but maybe somewhere else in /run would be acceptable. How does libvirt handle socket paths? Does it put them in /run, and can we emulate it...
2014 Jan 23
3
Re: Errors Running on Ubuntu 13.10
..._network: 0 >> guestfs_get_path: /usr/lib/guestfs >> guestfs_get_pgroup: 0 >> guestfs_get_program: libguestfs-test-tool >> guestfs_get_qemu: /usr/bin/qemu-system-x86_64 >> guestfs_get_recovery_proc: 1 >> guestfs_get_selinux: 0 >> guestfs_get_smp: 1 >> guestfs_get_tmpdir: /tmp >> guestfs_get_trace: 0 >> guestfs_get_verbose: 1 >> host_cpu: x86_64 >> Launching appliance, timeout set to 600 seconds. >> libguestfs: launch: backend=direct >> libguestfs: launch: tmpdir=/tmp/libguestfsH1o0hZ >> libguestfs: launch: umask=0022 >&...
2014 Aug 28
14
[PATCH 00/13] code refactorings for tools
Hi, this series does a couple of code reorganizations/refactoring in code used by tools: the windows path handling code, and the two types of file editing (using editor, and using perl expression). There's still a code duplication between the two variants of file editing, but it is just within a single source, and can be easily solved now (planning as next step). Pino Toscano (13): edit:
2016 May 12
0
[PATCH 2/4] src/tmpdirs.c: Add internal documentation.
...(guestfs_h *g, const char *tmpdir, char **tmpdir_ret) @@ -88,7 +93,12 @@ guestfs_impl_set_tmpdir (guestfs_h *g, const char *tmpdir) return set_abs_path (g, tmpdir, &g->int_tmpdir); } -/* Note this actually calculates the tmpdir, so it never returns NULL. */ +/** + * Implements the C<guestfs_get_tmpdir> API. + * + * Note this actually calculates the tmpdir, so it never returns + * C<NULL>. + */ char * guestfs_impl_get_tmpdir (guestfs_h *g) { @@ -110,7 +120,11 @@ guestfs_impl_set_cachedir (guestfs_h *g, const char *cachedir) return set_abs_path (g, cachedir, &g->int_cachedir)...
2020 Aug 24
0
Re: Running libguestfs-test-tool problem
...t_hv: /usr/bin/qemu-system-x86_64 > guestfs_get_memsize: 768 > guestfs_get_network: 0 > guestfs_get_path: /usr/lib/guestfs > guestfs_get_pgroup: 0 > guestfs_get_program: libguestfs-test-tool > guestfs_get_recovery_proc: 1 > guestfs_get_smp: 1 > guestfs_get_sockdir: /tmp > guestfs_get_tmpdir: /tmp > guestfs_get_trace: 0 > guestfs_get_verbose: 1 > host_cpu: x86_64 > Launching appliance, timeout set to 600 seconds. > libguestfs: launch: program=libguestfs-test-tool > libguestfs: launch: version=1.42.0 > libguestfs: launch: backend registered: unix > libguestfs: la...
2019 Nov 02
4
supermin: failed to find a suitable kernel
...roc = 1 guestfs_get_recovery_proc: 1 libguestfs: trace: get_smp libguestfs: trace: get_smp = 1 guestfs_get_smp: 1 libguestfs: trace: get_sockdir libguestfs: trace: get_sockdir = "/tmp" guestfs_get_sockdir: /tmp libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" guestfs_get_tmpdir: /tmp libguestfs: trace: get_trace libguestfs: trace: get_trace = 1 guestfs_get_trace: 1 libguestfs: trace: get_verbose libguestfs: trace: get_verbose = 1 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: trace: launch libguestfs: trace: version li...
2016 Apr 07
2
Help: Is it possible to use libguestfs in Xen guest OS
..._cachedir: /var/tmp guestfs_get_direct: 0 guestfs_get_hv: /usr/libexec/qemu-kvm guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/lib64/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_smp: 1 guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: program=libguestfs-test-tool libguestfs: launch: version=1.28.1rhel=7,release=1.55.el7.centos.2,libvirt libguestfs: launch: backend registered: unix libguestfs: la...
2019 Jan 22
4
Fedora 29 guestfish not working
...] guestfs_get_cachedir: /var/tmp guestfs_get_hv: /usr/bin/qemu-kvm guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/lib64/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_recovery_proc: 1 guestfs_get_smp: 1 guestfs_get_sockdir: /run/user/1000 guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: program=libguestfs-test-tool libguestfs: launch: version=1.39.11fedora=29,release=1.fc29,libvirt libguestfs: launch: backend registered: unix libguestfs: launch: b...
2014 Jun 04
2
Re: libguestfs supermin error
...s_get_cachedir: /var/tmp guestfs_get_direct: 0 guestfs_get_hv: /usr/bin/kvm guestfs_get_memsize: 768 guestfs_get_network: 0 guestfs_get_path: /usr/local/lib/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_smp: 1 guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: powerpc64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: program=libguestfs-test-tool libguestfs: launch: version=1.26.1 libguestfs: launch: backend registered: unix libguestfs: launch: backend registered: uml libgues...
2019 Jan 22
0
Re: Fedora 29 guestfish not working
...hv: /usr/bin/qemu-kvm > guestfs_get_memsize: 500 > guestfs_get_network: 0 > guestfs_get_path: /usr/lib64/guestfs > guestfs_get_pgroup: 0 > guestfs_get_program: libguestfs-test-tool > guestfs_get_recovery_proc: 1 > guestfs_get_smp: 1 > guestfs_get_sockdir: /run/user/1000 > guestfs_get_tmpdir: /tmp > guestfs_get_trace: 0 > guestfs_get_verbose: 1 > host_cpu: x86_64 > Launching appliance, timeout set to 600 seconds. > libguestfs: launch: program=libguestfs-test-tool > libguestfs: launch: version=1.39.11fedora=29,release=1.fc29,libvirt > libguestfs: launch: backend reg...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2015 Oct 13
1
Help, it's not working!
...hedir: /var/tmp guestfs_get_direct: 0 guestfs_get_hv: /usr/bin/qemu-system-x86_64 guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/lib/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_smp: 1 guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: program=libguestfs-test-tool libguestfs: launch: version=1.24.5 libguestfs: launch: backend registered: unix libguestfs: launch: backend registered: uml libguestfs...