Blame SOURCES/0021-krb5.aug-Support-realms-that-start-with-numbers-437.patch

c941cc
From b358a58ecfade3541694edcdffaf4068d96cf91e Mon Sep 17 00:00:00 2001
c941cc
From: Dustin Wheeler <mdwheele@ncsu.edu>
c941cc
Date: Mon, 6 Feb 2017 08:57:49 -0500
c941cc
Subject: [PATCH] [krb5.aug] Support realms that start with numbers (#437)
c941cc
c941cc
Currently, the default kerberos configuration that ships with
c941cc
Ubuntu has a realm that starts with a number (1TS.ORG). This
c941cc
causes the parser to fail and prevents krb5.conf from being
c941cc
available via augtool.
c941cc
c941cc
This patch allows numbers 0-9 as the first character of a
c941cc
realm.
c941cc
---
c941cc
 lenses/krb5.aug            | 4 ++--
c941cc
 lenses/tests/test_krb5.aug | 8 ++++++++
c941cc
 2 files changed, 10 insertions(+), 2 deletions(-)
c941cc
c941cc
diff --git a/lenses/krb5.aug b/lenses/krb5.aug
c941cc
index 8936f3a0..734ddde9 100644
c941cc
--- a/lenses/krb5.aug
c941cc
+++ b/lenses/krb5.aug
c941cc
@@ -21,8 +21,8 @@ let closebr = del /[ \t]*\}/ "}"
c941cc
    and realms in the [appdefaults] section.
c941cc
 *)
c941cc
 
c941cc
-let realm_re = /[A-Z][.a-zA-Z0-9-]*/
c941cc
-let realm_anycase_re = /[A-Za-z][.a-zA-Z0-9-]*/
c941cc
+let realm_re = /[A-Z0-9][.a-zA-Z0-9-]*/
c941cc
+let realm_anycase_re = /[A-Za-z0-9][.a-zA-Z0-9-]*/
c941cc
 let app_re = /[a-z][a-zA-Z0-9_]*/
c941cc
 let name_re = /[.a-zA-Z0-9_-]+/
c941cc
 
c941cc
diff --git a/lenses/tests/test_krb5.aug b/lenses/tests/test_krb5.aug
c941cc
index 743bb375..f746543b 100644
c941cc
--- a/lenses/tests/test_krb5.aug
c941cc
+++ b/lenses/tests/test_krb5.aug
c941cc
@@ -92,6 +92,10 @@ module Test_krb5 =
c941cc
                         }
c941cc
                 }
c941cc
 	}
c941cc
+    1TS.ORG = {
c941cc
+        kdc = kerberos.1ts.org
c941cc
+        admin_server = kerberos.1ts.org
c941cc
+    }
c941cc
         stanford.edu = {
c941cc
                 kdc = krb5auth1.stanford.edu
c941cc
                 kdc = krb5auth2.stanford.edu
c941cc
@@ -367,6 +371,10 @@ test Krb5.lns get fermi_str =
c941cc
         }
c941cc
       }
c941cc
     }
c941cc
+    { "realm" = "1TS.ORG"
c941cc
+      { "kdc" = "kerberos.1ts.org" }
c941cc
+      { "admin_server" = "kerberos.1ts.org" }
c941cc
+    }
c941cc
     { "realm" = "stanford.edu"
c941cc
       { "kdc" = "krb5auth1.stanford.edu" }
c941cc
       { "kdc" = "krb5auth2.stanford.edu" }
c941cc
-- 
c941cc
2.24.1
c941cc