[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC] subdomain patch for cfengine2
From: |
Olivier Fauchon |
Subject: |
[RFC] subdomain patch for cfengine2 |
Date: |
Tue, 10 May 2005 09:41:36 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050317) |
Hi,
Here is a simple patch that let CFengine create classes from FQDN in a
recursive way:
"laptop1.room13.facility3.site2.company.com"
will now be translated into the following clases :
laptop1.room13.facility3.site2.company.com
room13.facility3.site2.company.com
facility3.site2.company.com
site2.company.com
company.com
com
Please tell me if you find this stupid/useful and if you can add it to
the CVS.
Thx
--- cfengine-2.1.14/src/nameinfo.c 2005-02-08 12:50:02.000000000 +0100
+++ cfengine-2.1.14_subdomain/src/nameinfo.c 2005-05-02 17:46:08.000000000
+0200
@@ -139,10 +139,23 @@
{
if (*sp2 == '.')
{
+/*
*sp2 = '\0';
Debug("Truncating fully qualified hostname %s to
%s\n",VSYSNAME.nodename,sp);
break;
+*/
+ if (*(sp2+1) != '\0')
+ {
+ Debug("Definning domain #%s#\n",(sp2+1));
+ AddClassToHeap(CanonifyName(sp2+1));
+ }
+ else
+ {
+ Debug("Domain rejected\n");
+ }
+
}
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RFC] subdomain patch for cfengine2,
Olivier Fauchon <=