Displaying 20 results from an estimated 63 matches for "aug_close".
2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...t it's absolutely
setfiles:
14:06:20 I: Started virt-v2v -v -x -i ova /ovirt/import/fc21-64.ova -of
raw -o null
14:06:20 O: [ 0.0] Opening the source -i ova /ovirt/import/fc21-64.ova
[snip]
14:07:25 E: libguestfs: trace: v2v: aug_get = "targeted"
14:07:25 E: libguestfs: trace: v2v: aug_close
14:07:25 E: guestfsd: main_loop: new request, len 0x28
14:07:25 E: guestfsd: main_loop: proc 26 (aug_close) took 0.03 seconds
14:07:25 E: libguestfs: trace: v2v: aug_close = 0
14:07:25 E: libguestfs: trace: v2v: selinux_relabel
"/etc/selinux/targeted/contexts/files/file_contexts" "/&...
2016 Nov 16
0
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...;
> 14:06:20 I: Started virt-v2v -v -x -i ova /ovirt/import/fc21-64.ova -of
> raw -o null
> 14:06:20 O: [ 0.0] Opening the source -i ova /ovirt/import/fc21-64.ova
> [snip]
> 14:07:25 E: libguestfs: trace: v2v: aug_get = "targeted"
> 14:07:25 E: libguestfs: trace: v2v: aug_close
> 14:07:25 E: guestfsd: main_loop: new request, len 0x28
> 14:07:25 E: guestfsd: main_loop: proc 26 (aug_close) took 0.03 seconds
> 14:07:25 E: libguestfs: trace: v2v: aug_close = 0
> 14:07:25 E: libguestfs: trace: v2v: selinux_relabel
> "/etc/selinux/targeted/contexts/files/fil...
2018 Mar 05
2
virt-v2v 1.38 fails to convert .vmx VM: setfiles ... Multiple same specifications for /.*.
[This email is either empty or too large to be displayed at this time]
2018 Mar 06
3
Re: virt-v2v 1.38 fails to convert .vmx VM: setfiles ... Multiple same specifications for /.*.
...inux/config/#comment[6]", "/files/etc/selinux/config/#comment[7]", "/files/etc/selinux/config/#comment[8]", "/files/etc/selinux/config/#comment[9]", "/files/etc/selinux/config/SELINUX[1]", "/files/etc/selinux/config/SELINU]"]
libguestfs: trace: aug_close
guestfsd: => aug_ls (0x1c) took 0.00 secs
guestfsd: <= aug_close (0x1a) request length 40 bytes
libguestfs: trace: aug_close = 0
libguestfs: trace: grep "vdagentd.\pid" "/etc/selinux/targeted/contexts/files/file_contexts" "fixed:true"
guestfsd: => aug_close (0...
2016 May 19
2
[PATCH 1/2] customize: minor function factoring in ssh_key
...let expr = sprintf "/files/etc/passwd/%s/%s" user what in
g#aug_get expr
with G.Error _ ->
error (f_"ssh-inject: the user %s does not exist on the guest")
- user in
+ user
+ in
+ let home_dir = read_user_detail "home" in
g#aug_close ();
(* Create ~user/.ssh if it doesn't exist. *)
--
2.5.5
2020 Mar 09
4
[PATCH v3 0/3] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Changes from v2:
- dropped patch #1, as it was applied already (was a real bugfix)
- rebased on master
Pino Toscano (3):
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas
2020 Jan 09
5
[PATCH v2 0/4] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (4):
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas APIs to OCaml
daemon: drop usage of C
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
...en removing users.
Import the upstream shadow.aug (currently in their development serie,
but not part of any released version yet), and use it only when the
augeas version is less than a potential 1.2.1 (covering also the case
when the new version is just 1.3.0).
Pino Toscano (5):
daemon: make aug_close cleanup available for all
daemon: add a way to check for the version of augeas
appliance: daemon: import and use upstream shadow lens
sysprep: remove (now obsolete) comment about /etc/shadow lens
customize: use augeas to change passwords
appliance/Makefile.am | 3 +-...
2019 May 30
5
[PATCH 0/5] RFC: switch augeas APIs to OCaml
This synchronizes the embedded ocaml-augeas copy, and reimplements the
augeas APIs using it (dropping all the C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (5):
common/mlaugeas: Synchronize with latest ocaml-augeas
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement
2010 May 14
1
[PATCH] Rely on new augeas lens for modules.conf and conf.modules
...5,20 +203,18 @@ sub _init_augeas
die(user_message(__"Unable to find any valid modprobe configuration"))
unless(defined($self->{modules}));
+}
+
+sub _init_augeas
+{
+ my $self = shift;
+ my $g = $self->{g};
# Initialise augeas
eval {
$g->aug_close();
$g->aug_init("/", 1);
- # Add files which exist, but the augeas Modprobe lens doesn't look for
- # by default
- if(scalar(@modprobe_add) > 0) {
- foreach (@modprobe_add) {
- $g->aug_set("/augeas/load/Modprobe/i...
2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
Hi,
On Wed, November 16, 2016 11:10 am, Richard W.M. Jones wrote:
>
>> It eventually did complete, after several hours. But I don't understand
>> why this particular VM took so long when others (with similar disk
>> sizes/usages/configurations) completed in only 1-2 minutes. Each VM is
>> effectively exactly the same (it's a build slave), so it's just the
2011 Dec 07
2
failure converting Linux ESX guest to KVM hypervisor
...c/modprobe.conf/alias"
libguestfs: trace: aug_match = [""]
libguestfs: trace: aug_match "/files/etc/modprobe.d/*/alias"
libguestfs: trace: aug_match = [""]
libguestfs: trace: exists "/usr/sbin/load_policy"
libguestfs: trace: exists = 0
libguestfs: trace: aug_close
libguestfs: trace: aug_close = 0
libguestfs: trace: aug_init "/" 1
libguestfs: trace: aug_init = 0
libguestfs: trace: aug_match "/augeas/load/Grub/incl"
libguestfs: trace: aug_match = ["/augeas/load/Grub/incl[1]",
"/augeas/load/Grub/incl[2]"]
libguestfs: trac...
2014 Sep 29
2
[PATCH 1/2] builder, customize: disable SELinux
Having SELinux enabled (even if not enforcing) in the appliance causes
troubles to applications/libraries that read/write SELinux attributes.
---
builder/builder.ml | 6 +++++-
customize/customize_main.ml | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index a407924..5195cfd 100644
--- a/builder/builder.ml
+++
2020 May 05
3
[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code.
...selinuxtype_path = config_path ^ "/SELINUXTYPE" in
- let keys = g#aug_ls config_path in
- if array_find selinuxtype_path keys then
- g#aug_get selinuxtype_path
- else
- "targeted" in
+ g#touch "/.autorelabel"
+ )
- g#aug_close ();
+and is_selinux_guest g =
+ g#is_file ~followsymlinks:true "/usr/sbin/load_policy" &&
+ g#is_file ~followsymlinks:true "/etc/selinux/config"
- (* Get the spec file name. *)
- let specfile =
- sprintf "/etc/selinux/%s/contexts/files/file_cont...
2020 Sep 23
6
[common PATCH 0/3] SELinux_relabel: relabel only if enforcing (RHBZ#1828952)
Continuation/rework of:
https://www.redhat.com/archives/libguestfs/2020-May/msg00020.html
This is my approach, as I explained here:
https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c4
https://www.redhat.com/archives/libguestfs/2020-May/msg00035.html
IOW: do not attempt to relabel if the guest is not enforcing, as it is
either useless or may fail; few words more are in the comments of patch
#3.
2018 Jan 31
1
[PATCH] customize: allow missing SELINUXTYPE in SELinux config
.../files/etc/selinux/config" in
+ let selinuxtype_path = config_path ^ "/SELINUXTYPE" in
+ let keys = g#aug_ls config_path in
+ if Array.mem selinuxtype_path keys then
+ g#aug_get selinuxtype_path
+ else
+ "targeted" in
+
g#aug_close ();
(* Get the spec file name. *)
diff --git a/customize/test-selinuxrelabel.sh b/customize/test-selinuxrelabel.sh
new file mode 100755
index 000000000..d13c0356c
--- /dev/null
+++ b/customize/test-selinuxrelabel.sh
@@ -0,0 +1,49 @@
+#!/bin/bash -
+# Test SELinux relabel functionality.
+#...
2016 May 19
0
[PATCH 2/2] customize: fix ownership when creating ~/.ssh/authorized_keys (RHBZ#1337561)
...key.ml
@@ -115,20 +115,24 @@ let do_ssh_inject_unix (g : Guestfs.guestfs) user selector =
user
in
let home_dir = read_user_detail "home" in
+ let uid = int_of_string (read_user_detail "uid") in
+ let gid = int_of_string (read_user_detail "gid") in
g#aug_close ();
(* Create ~user/.ssh if it doesn't exist. *)
let ssh_dir = sprintf "%s/.ssh" home_dir in
if not (g#exists ssh_dir) then (
g#mkdir ssh_dir;
- g#chmod 0o700 ssh_dir
+ g#chmod 0o700 ssh_dir;
+ g#chown uid gid ssh_dir;
);
(* Create ~user/.ssh/authorize...
2014 Sep 29
0
[PATCH 2/2] customize: fix attributes of /etc/shadow (RHBZ#1146275)
...hadow" tempfile;
+
g#aug_init "/" 0;
let users = Array.to_list (g#aug_ls "/files/etc/shadow") in
List.iter (
@@ -116,9 +123,11 @@ let rec set_linux_passwords ~prog ?password_crypto g root passwords =
with Not_found -> ()
) users;
g#aug_save ();
+ g#aug_close ();
- (* In virt-sysprep /.autorelabel will label it correctly. *)
- g#chmod 0 "/etc/shadow"
+ (* Restore all the attributes from the temporary file, and remove it. *)
+ g#copy_attributes ~all:true tempfile "/etc/shadow";
+ g#rm tempfile
(* Encrypt each password. Use...
2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...er.
>>
>> I tried running virt-v2v by hand:
>>
>> LIBGUESTFS_BACKEND=direct virt-v2v -v -x -i ova fedora21.ova -of raw -o
>> null
>>
>> and it hung here:
>>
>> guestfsd: main_loop: new request, len 0x28
>> guestfsd: main_loop: proc 26 (aug_close) took 0.03 seconds
>> libguestfs: trace: v2v: aug_close = 0
>> libguestfs: trace: v2v: selinux_relabel
>> "/etc/selinux/targeted/contexts/files/file_contexts" "/" "force:true"
>> guestfsd: main_loop: new request, len 0x6c
>> commandrvf: st...
2017 Jul 31
0
[PATCH v11 02/10] daemon: Embed the ocaml-augeas library in the daemon.
...INC,
+ /* AugSaveNoop */ AUG_SAVE_NOOP,
+ /* AugNoLoad */ AUG_NO_LOAD,
+};
+
+/* Wrap and unwrap augeas_t handles, with a finalizer. */
+#define Augeas_t_val(rv) (*(augeas_t *)Data_custom_val(rv))
+
+static void
+augeas_t_finalize (value tv)
+{
+ augeas_t t = Augeas_t_val (tv);
+ if (t) aug_close (t);
+}
+
+static struct custom_operations custom_operations = {
+ (char *) "augeas_t_custom_operations",
+ augeas_t_finalize,
+ custom_compare_default,
+ custom_hash_default,
+ custom_serialize_default,
+ custom_deserialize_default
+};
+
+static value Val_augeas_t (augeas_t t)
+{
+...