search for: aug_no_load

Displaying 20 results from an estimated 39 matches for "aug_no_load".

2014 Sep 22
2
[PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
...he system lens for base definitions. Disabling the system path was worthless anyway, since our API does not allow user-specified custom paths. The only possible use for AUG_NO_STDINC to aug-init could have been to not load the lenses right at init time loading them later; however, this is what the AUG_NO_LOAD flag (= 32) does already. --- daemon/augeas.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemon/augeas.c b/daemon/augeas.c index ce49726..4f1d9a8 100644 --- a/daemon/augeas.c +++ b/daemon/augeas.c @@ -133,6 +133,11 @@ do_aug_init (const char *root, int flags) return -1; } +...
2014 Sep 22
2
Re: [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
...system path was worthless anyway, since > > our API does not allow user-specified custom paths. > > > > The only possible use for AUG_NO_STDINC to aug-init could have been > > to not load the lenses right at init time loading them later; > > however, this is what the AUG_NO_LOAD flag (= 32) does already. > > --- > > > > daemon/augeas.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/daemon/augeas.c b/daemon/augeas.c > > index ce49726..4f1d9a8 100644 > > --- a/daemon/augeas.c > > +++ b/daemon/augea...
2014 Oct 24
1
[PATCH v3] daemon: Remove custom Augeas lenses.
v3: - Don't remove the LVM transform.
2014 Oct 24
1
[PATCH v2] daemon: Remove custom Augeas lenses.
v2 of previous patch, which fixes some missing bits. For now I'm going to go with Pino's RHEL 7.1 patch, since it is at least smaller than this. So I'm sending this to the list just to have it archived for later. Rich.
2020 May 05
3
[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code.
...inks:true "/etc/selinux/config" then ( - (* Is setfiles / SELinux relabelling functionality available? *) - if g#feature_available [| "selinuxrelabel" |] then ( - (* Use Augeas to parse /etc/selinux/config. *) - g#aug_init "/" (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *); - (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *) - ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/\" !~ regexp('^') + glob(incl) + regexp('/.*')]"); - g#aug_load (); - debug_augeas_errors g; - - (* Get the SE...
2014 Oct 24
2
[PATCH] daemon: Remove custom Augeas lenses.
..."/etc/shadow", - 0 /* = included */); - if (r == -1) { - AUGEAS_ERROR ("aug_transform"); - aug_close (aug); - aug = NULL; - return -1; - } - - /* If aug_load was implicitly called, reload the handle. */ - if ((flags & AUG_NO_LOAD) == 0) { - if (aug_load (aug) == -1) { - AUGEAS_ERROR ("aug_load"); - return -1; - } - } - } - return 0; } diff --git a/daemon/daemon.h b/daemon/daemon.h index 0ccbc9e..95227d6 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -232,17 +232,6 @@ extern...
2014 Sep 22
0
Re: [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
...efinitions. Disabling the system path was worthless anyway, since our > API does not allow user-specified custom paths. > > The only possible use for AUG_NO_STDINC to aug-init could have been to > not load the lenses right at init time loading them later; however, this > is what the AUG_NO_LOAD flag (= 32) does already. > --- > daemon/augeas.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/daemon/augeas.c b/daemon/augeas.c > index ce49726..4f1d9a8 100644 > --- a/daemon/augeas.c > +++ b/daemon/augeas.c > @@ -133,6 +133,11 @@ do_aug_init (const ch...
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
Hi, currently /etc/shadow is edited manually when needed (i.e. when setting the password for an user), and it is not changed when 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
2014 Sep 22
0
Re: [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
...s anyway, since > > > our API does not allow user-specified custom paths. > > > > > > The only possible use for AUG_NO_STDINC to aug-init could have been > > > to not load the lenses right at init time loading them later; > > > however, this is what the AUG_NO_LOAD flag (= 32) does already. > > > --- > > > > > > daemon/augeas.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/daemon/augeas.c b/daemon/augeas.c > > > index ce49726..4f1d9a8 100644 > > > --- a/daem...
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.
2016 Nov 10
5
[PATCH v5 0/3] v2v and augeas
Augeas 1.7.0 was released a couple of days ago. By encouraging everyone to upgrade to this we can drop several calls to aug_transform and also our custom copies of two lenses, and a lot of related code. Rich.
2020 Jan 09
0
[PATCH v2 4/4] daemon: drop usage of C augeas library
...ah = NULL; - int r; - const char *str; - int major = 0, minor = 0, patch = 0; - - if (augeas_version != 0) - return; - - /* Optimization: do not load the files nor the lenses, since we are - * only interested in the version. - */ - ah = aug_init ("/", NULL, AUG_NO_ERR_CLOSE | AUG_NO_LOAD | AUG_NO_STDINC); - if (!ah) { - FPRINTF_AUGEAS_ERROR (ah, "augeas initialization failed"); - return; - } - - if (aug_error (ah) != AUG_NOERROR) { - FPRINTF_AUGEAS_ERROR (ah, "aug_init"); - return; - } - - r = aug_get (ah, "/augeas/version", &str);...
2020 Mar 09
0
[PATCH v3 3/3] daemon: drop usage of C augeas library
...ah = NULL; - int r; - const char *str; - int major = 0, minor = 0, patch = 0; - - if (augeas_version != 0) - return; - - /* Optimization: do not load the files nor the lenses, since we are - * only interested in the version. - */ - ah = aug_init ("/", NULL, AUG_NO_ERR_CLOSE | AUG_NO_LOAD | AUG_NO_STDINC); - if (!ah) { - FPRINTF_AUGEAS_ERROR (ah, "augeas initialization failed"); - return; - } - - if (aug_error (ah) != AUG_NOERROR) { - FPRINTF_AUGEAS_ERROR (ah, "aug_init"); - return; - } - - r = aug_get (ah, "/augeas/version", &str);...
2019 May 29
4
[PATCH 0/3] Simple augeas-related changes
- bump the augeas requirement to 1.2.0, and drop an old hack - add a small helper in the generator Pino Toscano (3): build: raise augeas requirement to 1.2.0 appliance: remove custom Shadow augeas lens daemon: implement OptString for OCaml APIs appliance/Makefile.am | 6 +-- appliance/guestfs_shadow.aug | 72 ------------------------------------ daemon/augeas.c | 21
2016 Jul 14
0
[PATCH v2 4/7] customize: Add module for doing SELinux relabel of filesystem.
...Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Common_gettext.Gettext +open Common_utils + +open Printf + +module G = Guestfs + +let relabel (g : G.guestfs) = + (* Use Augeas to parse /etc/selinux/config. *) + g#aug_init "/" (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *); + (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *) + ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/\" !~ regexp('^') + glob(incl) + regexp('/.*')]"); + g#aug_load (); + debug_augeas_errors g; + + (* Get the SELinux policy name, e...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...ndle */ + return -1; + if (size > MAX_AUGEAS_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + configfiles[i], size); + return -1; + } + } + + if (guestfs_aug_init (g, "/", 16|32 /* AUG_SAVE_NOOP|AUG_NO_LOAD */) == -1) + return -1; + + r = -1; + + /* Tell Augeas to only load configfiles and no other files. This + * prevents a rogue guest from performing a denial of service attack + * by having large, over-complicated configuration files which are + * unrelated to the task at hand. (Thanks...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points. Fixes RHBZ#1113153. Maros Zatko (1): inspection: add support for systemd .mount files src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) -- 1.9.3
2017 Jul 31
0
[PATCH v11 02/10] daemon: Embed the ocaml-augeas library in the daemon.
..., msg); +} + +/* Map OCaml flags to C flags. */ +static int flag_map[] = { + /* AugSaveBackup */ AUG_SAVE_BACKUP, + /* AugSaveNewFile */ AUG_SAVE_NEWFILE, + /* AugTypeCheck */ AUG_TYPE_CHECK, + /* AugNoStdinc */ AUG_NO_STDINC, + /* 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 = { + (...
2017 Jul 26
5
[PATCH 0/2] daemon: Reimplement handling of lvm.conf and filters.
Simplify how we handle lvm.conf.
2014 Aug 26
6
[PATCH 0/3] fix setting lvm filter with newer lvm2
Hi, newer lvm2 releases don't have have uncommented "filter" lines, so the current way to edit lvm.conf doesn't work anymore. Instead, switch to augeas (with a "custom" len) for a cleaner and working way to set the lvm filter. Pino Toscano (3): daemon: add add_sprintf daemon: move AUGEAS_ERROR to the common header daemon: lvm-filter: use augeas for setting the