[Libguestfs] [PATCH 4/5] sysprep: remove comment and notes about /etc/shadow lens

Pino Toscano ptoscano at redhat.com
Thu Sep 4 15:26:54 UTC 2014


We are either using the upstream lens, or our copy of it, to handle
/etc/shadow, so now removing entries from it works.
---
 sysprep/sysprep_operation_user_account.ml | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml
index cdb0bfd..3ed1b6e 100644
--- a/sysprep/sysprep_operation_user_account.ml
+++ b/sysprep/sysprep_operation_user_account.ml
@@ -93,10 +93,6 @@ let user_account_perform ~verbose ~quiet g root side_effects =
                   username;
               None in
           g#aug_rm userpath;
-          (* XXX Augeas doesn't yet have a lens for /etc/shadow, so the
-           * next line currently does nothing, but should start to
-           * work in a future version.
-           *)
           g#aug_rm (sprintf "/files/etc/shadow/%s" username);
           g#aug_rm (sprintf "/files/etc/group/%s" username);
           match home_dir with
@@ -118,10 +114,6 @@ The \"root\" account is not removed.
 
 See the I<--user-accounts> parameter for a way to specify
 how to remove only some users, or to not remove some others.");
-    pod_notes = Some (s_"\
-Currently this does not remove the user accounts from
-C</etc/shadow>.  This is because there is no lens for
-the shadow password file in Augeas.");
     extra_args = [
       { extra_argspec = "--user-accounts", Arg.String set_users, s_"users" ^ " " ^ s_"Users to remove/keep";
         extra_pod_argval = Some "USERS";
-- 
1.9.3




More information about the Libguestfs mailing list