Blob Blame Raw
From 8d7929bdae06fcfc06eeb24448f2af5fd78821cc Mon Sep 17 00:00:00 2001
From: Dominic Cleal <dcleal@redhat.com>
Date: Mon, 21 Jul 2014 08:15:06 +0100
Subject: [PATCH] Services: permit colons in service name

Fixes RHBZ#1121263

(cherry picked from commit a32a5a395bc63094ba59857fd5dc329c28ddee32)

Conflicts:
	NEWS
---
 lenses/services.aug            | 2 +-
 lenses/tests/test_services.aug | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lenses/services.aug b/lenses/services.aug
index 338737d..bad590f 100644
--- a/lenses/services.aug
+++ b/lenses/services.aug
@@ -47,7 +47,7 @@ let comment     = Util.comment
 let comment_or_eol = Util.comment_or_eol
 let empty       = Util.empty
 let protocol_re = /[a-zA-Z]+/
-let word_re     = /[a-zA-Z0-9_.+*\/-]+/
+let word_re     = /[a-zA-Z0-9_.+*\/:-]+/
 let num_re      = /[0-9]+/
 
 (* Group: Separators *)
diff --git a/lenses/tests/test_services.aug b/lenses/tests/test_services.aug
index aef5143..28725fe 100644
--- a/lenses/tests/test_services.aug
+++ b/lenses/tests/test_services.aug
@@ -79,3 +79,10 @@ z39.50		210/tcp		z3950 wais	# NISO Z39.50 database \n"
       { "end" = "6063" }
       { "protocol" = "tcp" }
       { "#comment" = "X Window System" } }
+
+  (* Colons permitted in service names, RHBZ#1121263 *)
+  test Services.lns get "SWRPC.ACCESS.BSS:BS_rmq  48102/tcp  # SWIFTAlliance_SWRPC ACCESS\n" =
+    { "service-name" = "SWRPC.ACCESS.BSS:BS_rmq"
+      { "port" = "48102" }
+      { "protocol" = "tcp" }
+      { "#comment" = "SWIFTAlliance_SWRPC ACCESS" } }