[augeas-devel] augeas: master - Made samba aug accept entry keys with ':' in them

David Lutterkort lutter at fedoraproject.org
Thu Dec 10 03:07:17 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=f090e096ed502dee6dc4d4009bfd72c31869d274
Commit:        f090e096ed502dee6dc4d4009bfd72c31869d274
Parent:        bf0a31202fd8059d1f235681d74a0c95ba021e54
Author:        Partha Aji <paji at redhat.com>
AuthorDate:    Fri Dec 4 15:20:07 2009 -0500
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Wed Dec 9 19:06:59 2009 -0800

Made samba aug accept entry keys with ':' in them

---
 lenses/samba.aug            |    4 ++--
 lenses/tests/test_samba.aug |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lenses/samba.aug b/lenses/samba.aug
index 4b303f6..30db88e 100644
--- a/lenses/samba.aug
+++ b/lenses/samba.aug
@@ -14,7 +14,7 @@ module Samba =
  *************************************************************************)
 
 let comment  = IniFile.comment IniFile.comment_re IniFile.comment_default
-let sep      = del /[ \t]*[=:]/ " ="
+let sep      = del /[ \t]*=/ " ="
 let indent   = del /[ \t]*/ "   "
 
 (* Import useful INI File primitives *)
@@ -29,7 +29,7 @@ let sto_to_comment
  * smb.conf allows indented entries
  *************************************************************************)
 
-let entry_re = /[A-Za-z0-9_.-][A-Za-z0-9 _.-]*[A-Za-z0-9_.-]/
+let entry_re = /[A-Za-z0-9_.-][A-Za-z0-9 _.:-]*[A-Za-z0-9_.-]/
 let entry    = let kw = entry_re in
              [ indent
              . key kw
diff --git a/lenses/tests/test_samba.aug b/lenses/tests/test_samba.aug
index 9410fec..f79b80a 100644
--- a/lenses/tests/test_samba.aug
+++ b/lenses/tests/test_samba.aug
@@ -81,3 +81,7 @@ module Test_samba =
          { "printcap name" = "/etc/printcap" }
          { "print command" = "/usr/bin/lpr -P%p -r %s" }
          { "printing" = "cups" } }
+
+    test Samba.lns get "[test]\ncrazy:entry = foo\n" =
+         { "target" = "test"
+            {"crazy:entry" = "foo"}}




More information about the augeas-devel mailing list