[augeas-devel] [Augeas] #250: Changes to grub lens

Augeas trac at fedorahosted.org
Fri Jan 13 19:57:01 UTC 2012


#250: Changes to grub lens
--------------------+---------------------
 Reporter:  erinn   |       Owner:  lutter
     Type:  defect  |      Status:  new
 Priority:  major   |   Milestone:  next
Component:  Augeas  |     Version:  0.9.0
 Keywords:          |  Blocked By:
 Blocking:          |
--------------------+---------------------
 The password section for the grub lens is a bit strange, at least to my
 eyes.

     (* View: password_arg *)
     let password_arg = [ key "password" .
       (spc . [ switch "md5" ])? .
       spc . store (/[^ \t\n]+/ - "--md5") .
       (spc . [ label "file" . store /[^ \t\n]+/ ])? .
       eol ]

 This ends up with a tree that has password = <password hash> and then a
 sub node that is md5 = clear. I am no expert here but it seems like a more
 intuitive flow would be password/md5 = <hash>.

 Second bit, Red Hat has, as of 6.1, added support for sha256/512 hashes
 not just md5 (see here: http://docs.redhat.com/docs/en-
 US/Red_Hat_Enterprise_Linux/6/html/6.1_Technical_Notes/grub.html) and this
 is supported via a --encrypted flag, so the line looks like this:
 password --encrypted <hash>

 So that needs to be added to the lens because right now it falls under the
 file section. As a side note I noticed there is no test for file,
 unfortunately I don't know much about the file directive.

 This was all tested on RHEL 6, but it is applicable to 0.10.0 and head as
 well.

 -Erinn

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/250>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list