[augeas-devel] [PATCH] Allow backslashes in the middle of sto_to_com and sto_to_com_user

Raphael Pinson raphink at gmail.com
Tue Apr 7 21:48:14 UTC 2009


From: Raphaël Pinson <raphink at raphink.net>

---
 lenses/sudoers.aug |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lenses/sudoers.aug b/lenses/sudoers.aug
index 39d7d12..4591066 100644
--- a/lenses/sudoers.aug
+++ b/lenses/sudoers.aug
@@ -84,11 +84,13 @@ let sep_dquote   = Util.del_str "\""
 (* Variable: sto_to_com_cmnd
 sto_to_com_cmnd does not begin or end with a space
 
-TODO: there could be a \ in the middle of a command... *)
-let sto_to_com_cmnd = store /([^,=:#() \t\n\\\\][^,=:#()\n\\\\]*[^,=:#() \t\n\\\\])|[^,=:#() \t\n\\\\]/
+There could be a \ in the middle of a command *)
+let sto_to_com_cmnd = store /([^,=:#() \t\n\\\\][^,=:#()\n]*[^,=:#() \t\n\\\\])|[^,=:#() \t\n\\\\]/
 
-(* Variable: sto_to_com *)
-let sto_to_com      = store /[^,=:#() \t\n\\\\]+/
+(* Variable: sto_to_com 
+
+There could be a \ in the middle of a command *)
+let sto_to_com      = store /([^,=:#() \t\n\\\\][^,=:#()\n]*[^,=:#() \t\n\\\\])|[^,=:#() \t\n\\\\]/
 
 (* Variable: sto_to_com_user *)
 let sto_to_com_user = store ( /[^,=:#() \t\n]+/
-- 
1.5.6.3




More information about the augeas-devel mailing list