search for: userpath

Displaying 15 results from an estimated 15 matches for "userpath".

2015 Jul 01
1
Re: [PATCH 1/2] mllib: add and use last_part_of
...ord.ml b/customize/password.ml > > index 25ce901..d91c4b5 100644 > > --- a/customize/password.ml > > +++ b/customize/password.ml > > @@ -98,8 +98,9 @@ let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root password > > List.iter ( > > fun userpath -> > > let user = > > - let i = String.rindex userpath '/' in > > - String.sub userpath (i+1) (String.length userpath -i-1) in > > + match last_part_of userpath '/' with > > + | Some x -> x > > + | N...
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
...insertions(+), 17 deletions(-) diff --git a/customize/password.ml b/customize/password.ml index 25ce901..d91c4b5 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -98,8 +98,9 @@ let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root password List.iter ( fun userpath -> let user = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in + match last_part_of userpath '/' with + | Some x -> x + | None -> error "password: missing '/' in %s&qu...
2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
..._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. *) + let home_dir = g#aug_get (userpath ^ "/home") in...
2015 Jul 01
0
Re: [PATCH 1/2] mllib: add and use last_part_of
...; diff --git a/customize/password.ml b/customize/password.ml > index 25ce901..d91c4b5 100644 > --- a/customize/password.ml > +++ b/customize/password.ml > @@ -98,8 +98,9 @@ let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root password > List.iter ( > fun userpath -> > let user = > - let i = String.rindex userpath '/' in > - String.sub userpath (i+1) (String.length userpath -i-1) in > + match last_part_of userpath '/' with > + | Some x -> x > + | None -> error "password...
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
...omize/password.ml index 25ce901..cb97804 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -97,9 +97,7 @@ let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root password let users = Array.to_list (g#aug_ls "/files/etc/shadow") in List.iter ( fun userpath -> - let user = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in + let user = last_part_of userpath '/' in try (* Each line is: "user:[!!]password:..." * !! at the fron...
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 Dec 05
0
[PATCH] sysprep: user-account: mark "changed file" if users were removed
..._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_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 ( + changed := true; (* Get the home before removing the passwd entry. *) let home_dir = try Some (g#a...
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 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 +++
2011 Dec 13
5
Backing Up To Windows File Server
Greetings, Working with dsync and setting up backups to a Windows file server. Problem seems to be that Windows is renaming the dovecot mail files (maildir) to Windows friendly filenames, and losing the Dovecot name. For example, 1323817925.M36368P32049.triata.globalchangemultimedia.net,S=2255,W=2318:2,S becomes 1AETPH~X. Does anyone have any ideas about how to tell Windows to not do this?
2014 Oct 28
1
[PATCH] sysprep: remove /var/spool/mail/username
...ep_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_dir with | None -> () | Some dir -> g#rm_...
2010 Aug 24
8
Home directories
I've noticed that a lot of people are using e.g.: mail_location = maildir:/var/vmail/%d/%n Then either they don't have home directory set, or their home directory is the same as the maildir. http://wiki.dovecot.org/VirtualUsers/Home explains all the problems of not separate home and mail directories. Also whenever I try to suggest using a separate home and mail directory, the answer is
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...count_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 = let home_dir = try Some (g#aug_get (userpath ^ "/home")) with _ -> - if verbose then + if verbose () then warning (f_"Cannot get the home directory for %s") username; None in diff --git a/sysprep/sysprep_operation_utmp.ml b/sysprep...
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