----- Original Message -----
From: Jeremy Knope
To: coba-e (at mark) bluequartz.org
Sent: Friday, April 11, 2008 12:01 PM
Subject: [coba-e:12545] Wildcard DNS in GUI fix/patch
I didn't find anything in my search for how to make BlueQuartz allow
creation of wildcard DNS records in the DNS management UI. So I plunged in
to fix it myself in the BQ source. I finally found it, and it appears to
work great. If anybody is wondering what I did, here's the run down.
Initial validation done by javascript, I added a simple * only check to the
domainname change handler, only applies to a_host_name field. I'm not sure
if this is best method, so any feedback welcome. (this file is part of the
ui/palette package in source)
/usr/sausalito/ui/web/libJs/uifc/DomainName.js:
function DomainName_changeHandler(element) {
if(element.name == 'a_host_name') {
if(element.value.length == 1 && element.value.charAt(0) == '*') { //
wildcard OK, relies on dns.schema change in dns mod
return true;
}
}
if(!DomainName_isDomainNameValid(element.value)) {
top.code.error_invalidElement(element,
top.code.string_substitute(element.invalidMessage, "[[VAR.invalidValue]]",
element.value));
return false;
}
return true;
}
And the other change is the db.schema of the base-dns.mod module, in
source, not sure this can be done live. I changed it and built the RPM,
upgrading the base-dns rpms to mine after. I edited
base-dns.mod/glue/schemas/dns.schema adding a typedef at top:
<typedef name="hostname_rsc" type="re"
data="^[A-Za-z0-9\*][A-Za-z0-9\-]*(\\.[A-Za-z0-9][A-Za-z0-9\-]*)*$"/>
and changing the hostname field to use hostname_rsc type instead of hostname
(I didn't want to change the base type within cce server)
~line 413:
<property name="hostname" type="hostname_rsc" default="" optional="true"
writeacl="ruleCapable(dnsAdmin)"/>
Any thoughts or comments/questions let me know. It was always annoying me
that we had to go edit the zone file itself instead of being able to enter
'*' into the UI. So now we can!
-- Jerome
Jeremy Knope
Web Programmer
Rainstorm Consulting: http://www.rainstormconsulting.com
"Designing Strategies for Internet Success."
jerome (at mark) rainstorminc.com
Phone: 207-866-3908
Fax: 207-866-0297
<<
Jeremy
This should be very useful, especially to those peopel that use subdomains.
Thanks!
----
Ken Marcus
Ecommerce Web Hosting by
Precision Web Hosting, Inc.
http://www.precisionweb.net