search for: user_account_perform

Displaying 17 results from an estimated 17 matches for "user_account_perform".

2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
...++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index 3d88ffc..dc194f4 100644 --- a/sysprep/sysprep_operation_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. *) +...
2014 Dec 05
0
[PATCH] sysprep: user-account: mark "changed file" if users were removed
...s(+), 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 @@ -72,6 +73,7 @@ let user_account_per...
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 +++
2014 Oct 28
1
[PATCH] sysprep: remove /var/spool/mail/username
...er_account.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index fda5547..bda6331 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -83,6 +83,7 @@ let user_account_perform ~verbose ~quiet g root side_effects = g#aug_rm userpath; g#aug_rm (sprintf "/files/etc/shadow/%s" username); g#aug_rm (sprintf "/files/etc/group/%s" username); + g#rm_rf ("/var/spool/mail/" ^ username); match home_di...
2012 Apr 18
1
[PATCH RFC] sysprep: remove user accounts
...e for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Sysprep_operation + +module G = Guestfs + +let user_account_perform g root = + let typ = g#inspect_get_type root in + if typ <> "windows" then ( + let login_def = "/etc/login.defs" in + let lines = Array.to_list (g#read_lines login_def) in + let line_min = Array.filter ( + fun line -> (string_prefix line "UID_MIN&qu...
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
...part of a string, after the specified separator. *) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index 3f3b142..78c60d0 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -69,8 +69,9 @@ let user_account_perform g root side_effects = let uid = g#aug_get uid in let uid = int_of_string uid in let username = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in + match last_part_of userpath '/'...
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
...part of a string, after the specified separator. *) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index 3f3b142..fe460b8 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -68,9 +68,7 @@ let user_account_perform g root side_effects = let uid = userpath ^ "/uid" in let uid = g#aug_get uid in let uid = int_of_string uid in - let username = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in...
2015 Jul 01
0
Re: [PATCH 1/2] mllib: add and use last_part_of
...the specified separator. *) > diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml > index 3f3b142..78c60d0 100644 > --- a/sysprep/sysprep_operation_user_account.ml > +++ b/sysprep/sysprep_operation_user_account.ml > @@ -69,8 +69,9 @@ let user_account_perform g root side_effects = > let uid = g#aug_get uid in > let uid = int_of_string uid in > let username = > - let i = String.rindex userpath '/' in > - String.sub userpath (i+1) (String.length userpath -i-1) in > + match las...
2015 Jul 01
1
Re: [PATCH 1/2] mllib: add and use last_part_of
...*) > > diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml > > index 3f3b142..78c60d0 100644 > > --- a/sysprep/sysprep_operation_user_account.ml > > +++ b/sysprep/sysprep_operation_user_account.ml > > @@ -69,8 +69,9 @@ let user_account_perform g root side_effects = > > let uid = g#aug_get uid in > > let uid = int_of_string uid in > > let username = > > - let i = String.rindex userpath '/' in > > - String.sub userpath (i+1) (String.length userpath -i-1) in...
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 = *
2014 Jan 21
1
[PATCH 1/2] sysprep: Update comments.
--- sysprep/sysprep_operation.mli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli index 61dde72..eb89db4 100644 --- a/sysprep/sysprep_operation.mli +++ b/sysprep/sysprep_operation.mli @@ -16,14 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -(** Structure used to describe sysprep
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
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...; 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_perform ~verbose ~quiet g root side_effects =...
2012 Apr 30
5
[PATCH 0/4 v1] Remove gettextify, implement OCaml gettext.
Version 1 of the patch, for discussion, but not to be applied. It does work, but needs a lot more testing. This removes all the psychopathic gettextify cruft, and replaces it with a 99 line Makefile.am. A large win, I think. The third patch implements gettext support in the OCaml tools. The fourth patch is just for illustration. It shows the consequent changes to libguestfs.pot and the po
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.
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