Re: How to identify a raw zone file

2011-12-02 Thread Jan-Piet Mens
 I'd recommend checking the next four octets as well; they'll be 00 00 00 00
 or 00 00 00 01.

I've hacked up a magic(5) file which seems to work for me:

$ file *
inline.aa:BIND raw format zone file  v9.9
inline.aa.jnl:BIND journal file v9
inline.aa.signed: BIND raw format zone file  v9.9
inline.aa.signed.jnl: BIND journal file v9

I'm attaching the file I dropped into /usr/share/file/magic/

-JP

#--
# bind:  file(1) magic for BIND zone file binary formats

#
# By JP Mens from information given by Evan Hunt
#  I've looked at a few of them, and I noticed that all the ones I've seen
#  start with the four-octet string 00 00 00 02.  Is that sufficient?
# 
# I'd recommend checking the next four octets as well; they'll be 00 00 00 00
# or 00 00 00 01.  The first of those is the format that's always been used
# up to now; the second is the format that will be used in 9.9.0, starting
# with the next beta.
#
0   belong  0x BIND raw format zone file
4  belong  0x  v9.9
4  belong  0x0001 = v9.9

0   string  ;BIND\ LOG\ V9  BIND journal file v9
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: How to identify a raw zone file

2011-12-02 Thread Tony Finch
Evan Hunt e...@isc.org wrote:

 I'd recommend checking the next four octets as well; they'll be 00 00 00 00
 or 00 00 00 01.  The first of those is the format that's always been used
 up to now; the second is the format that will be used in 9.9.0, starting
 with the next beta.

Would it be possible for bind to auto-detect the format?

Tony.
-- 
f.anthony.n.finch  d...@dotat.at  http://dotat.at/
Biscay: North or northwest, backing west, 5 to 7. Rough or very rough. Rain or
showers. Moderate or good.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: How to identify a raw zone file

2011-12-02 Thread Chris Thompson

On Dec 1 2011, Evan Hunt wrote:


I've looked at a few of them, and I noticed that all the ones I've seen
start with the four-octet string 00 00 00 02.  Is that sufficient?


I'd recommend checking the next four octets as well; they'll be 00 00 00 00
or 00 00 00 01.  The first of those is the format that's always been used
up to now; the second is the format that will be used in 9.9.0, starting
with the next beta.


Ho hum... does this mean that if one has been running a 9.9.0b(next) or later
and let it generate master files in the new raw format (e.g. as a result
of dynamic updates), then one would have a problem backing off to earlier
BIND versions?

--
Chris Thompson
Email: c...@cam.ac.uk
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: How to identify a raw zone file

2011-12-02 Thread Evan Hunt
 Ho hum... does this mean that if one has been running a 9.9.0b(next) or 
 later and let it generate master files in the new raw format (e.g. as a
 result of dynamic updates), then one would have a problem backing off to
 earlier BIND versions?

Yes, but named-compilezone can convert back to the older version.  (Thanks
for reminding me of that scenario, we'll need to mention it in the release
notes.)

-- 
Evan Hunt -- e...@isc.org
Internet Systems Consortium, Inc.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


How to identify a raw zone file

2011-12-01 Thread Mark Pettit
With the pending release of BIND 9.9.0, and the beta testing my company is 
currently doing, we've realized we need a good way to detect zone file type and 
convert it.

Is there any simple way to look at a file and quickly determine whether or not 
it's a BIND raw format zonefile, as opposed to a text format zonefile?

I've looked at a few of them, and I noticed that all the ones I've seen start 
with the four-octet string 00 00 00 02.  Is that sufficient?

Mark Pettit
Yahoo!, Inc.
pet...@yahoo-inc.com

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: How to identify a raw zone file

2011-12-01 Thread Evan Hunt
 I've looked at a few of them, and I noticed that all the ones I've seen
 start with the four-octet string 00 00 00 02.  Is that sufficient?

I'd recommend checking the next four octets as well; they'll be 00 00 00 00
or 00 00 00 01.  The first of those is the format that's always been used
up to now; the second is the format that will be used in 9.9.0, starting
with the next beta.

-- 
Evan Hunt -- e...@isc.org
Internet Systems Consortium, Inc.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users