search for: check_remove_user

Displaying 11 results from an estimated 11 matches for "check_remove_user".

2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
...on_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -84,6 +84,8 @@ let user_account_perform ~verbose ~quiet g root side_effects = String.sub userpath (i+1) (String.length userpath -i-1) in if uid >= uid_min && uid <= uid_max && check_remove_user username then ( + (* Get the home before removing the passwd entry. *) + let home_dir = g#aug_get (userpath ^ "/home") in g#aug_rm userpath; (* XXX Augeas doesn't yet have a lens for /etc/shadow, so the * next line currently does not...
2014 Dec 05
0
[PATCH] sysprep: user-account: mark "changed file" if users were removed
...++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index bda6331..e53e5cc 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -55,6 +55,7 @@ let check_remove_user user = let user_account_perform ~verbose ~quiet g root side_effects = let typ = g#inspect_get_type root in + let changed = ref false in if typ <> "windows" then ( g#aug_init "/" 0; let uid_min = g#aug_get "/files/etc/login.defs/UID_MIN" in @@...
2014 Dec 05
3
[PATCH] customize, sysprep: add a short SELinux note
Add a short paragraph about SELinux, mostly to point to the documentation about it provided in the documentation of virt-builder. --- customize/virt-customize.pod | 8 ++++++++ sysprep/virt-sysprep.pod | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod index a666be7..8dbdfef 100644 --- a/customize/virt-customize.pod +++
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
...(i+1) (String.length userpath -i-1) in + match last_part_of userpath '/' with + | Some x -> x + | None -> error "user-accounts: missing '/' in %s" userpath in if uid >= uid_min && uid <= uid_max && check_remove_user username then ( changed := true; diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index 7967c0f..f5a716f 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -795,13 +795,9 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source = *) let m...
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
...id in - let username = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in + let username = last_part_of userpath '/' in if uid >= uid_min && uid <= uid_max && check_remove_user username then ( changed := true; diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index 7967c0f..cadd515 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -795,10 +795,8 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source = *) let m...
2015 Jul 01
0
Re: [PATCH 1/2] mllib: add and use last_part_of
...path -i-1) in > + match last_part_of userpath '/' with > + | Some x -> x > + | None -> error "user-accounts: missing '/' in %s" userpath in > if uid >= uid_min && uid <= uid_max > && check_remove_user username then ( > changed := true; > diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml > index 7967c0f..f5a716f 100644 > --- a/v2v/convert_linux.ml > +++ b/v2v/convert_linux.ml > @@ -795,13 +795,9 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect so...
2015 Jul 01
1
Re: [PATCH 1/2] mllib: add and use last_part_of
...match last_part_of userpath '/' with > > + | Some x -> x > > + | None -> error "user-accounts: missing '/' in %s" userpath in > > if uid >= uid_min && uid <= uid_max > > && check_remove_user username then ( > > changed := true; > > diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml > > index 7967c0f..f5a716f 100644 > > --- a/v2v/convert_linux.ml > > +++ b/v2v/convert_linux.ml > > @@ -795,13 +795,9 @@ let rec convert ~keep_serial_cons...
2015 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing specific files. --- mllib/common_utils.ml | 8 +++++++- mllib/common_utils.mli | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 516cff3..3737b4c 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -640,13 +640,19 @@ let rmdir_on_exit = *
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...quot;/etc/udev/rules.d/70-persistent-net.rules" diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index e53e5cc..0f676ec 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -53,7 +53,7 @@ let check_remove_user user = else false -let user_account_perform ~verbose ~quiet g root side_effects = +let user_account_perform ~quiet g root side_effects = let typ = g#inspect_get_type root in let changed = ref false in if typ <> "windows" then ( @@ -78,7 +78,7 @@ let user_account_p...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623