[augeas-devel] Augeas and likewise-open

Marcello de Sousa lists at area151.com
Mon Sep 28 21:53:37 UTC 2009


Hi,

I wanted to use augeas to manage my /etc/krb5.conf but the standard krb5.aug
lens doesn't work after likewise-open modifies it.
The lens should support white spaces in the value field, and a "kdc" section
(present on RH4).
I'm not sure exactly how to properly submit a patch here, but here is how
I've fixed it:
-------------------------------------------------------
--- krb5.aug    2009-05-29 21:15:45.000000000 +0200
+++ krb5.aug_patched    2009-09-28 23:28:45.000000000 +0200
@@ -24,7 +24,7 @@
 let app_re = /[a-z0-9_]+/
 let name_re = /[.a-zA-Z0-9_-]+/

-let value = store /[^;# \t\n{}]+/
+let value = store /[^;#\t\n{}]+/
 let entry (kw:regexp) (sep:lens) (comment:lens)
     = [ indent . key kw . sep . value . (comment|eol) ] | comment

@@ -68,6 +68,9 @@
 let domain_realm =
   simple_section "domain_realm" name_re

+let kdc =
+  simple_section "kdc" name_re
+
 let logging =
   let keys = /kdc|admin_server|default/ in
   let xchg (m:regexp) (d:string) (l:string) =
@@ -114,7 +117,7 @@
     record "instancemapping" instance

 let lns = (comment|empty)* .
-  (libdefaults|login|appdefaults|realms|domain_realm
+  (libdefaults|login|appdefaults|realms|domain_realm|kdc
   |logging|capaths|dbdefaults|dbmodules|instance_mapping)*

 let xfm = transform lns (incl "/etc/krb5.conf")
-------------------------------------------------------

Cheers,
Marcello





More information about the augeas-devel mailing list