2 #------------------------------------------------------------------------------
3 # $File: kerberos,v 1.1 2014/12/10 18:45:43 christos Exp $
4 # kerberos: MIT kerberos file binary formats
7 # This magic entry is for demonstration purposes and could be improved
8 # if the following features were implemented in file:
10 # Strings inside [[ .. ]] in the descriptions have special meanings and
13 # - Provide some form of iteration in number of components
14 # [[${counter}=%d]] in the description
16 # [${counter}--] in the offset of the entries
17 # - Provide a way to round the next offset
18 # Add [R:4] after the offset?
19 # - Provide a way to have optional entries
21 # - Provide a way to "save" entries to print them later.
22 # if the description is [[${name}=%s]], then nothing is
23 # printed and a subsequent entry in the same magic file
24 # can refer to ${name}
25 # - Provide a way to format strings as hex values
27 # http://www.gnu.org/software/shishi/manual/html_node/\
28 # The-Keytab-Binary-File-Format.html
32 #>0 beshort x \b, size=%d
33 #>2 beshort x \b, components=%d
34 >4 pstring/H x \b, realm=%s
35 >>&0 pstring/H x \b, principal=%s/
36 >>>&0 pstring/H x \b%s
37 >>>>&0 belong x \b, type=%d
38 >>>>>&0 bedate x \b, date=%s
39 >>>>>>&0 byte x \b, kvno=%u
40 #>>>>>>>&0 pstring/H x
42 #>>>>>>>>>>&0 use keytab_entry
44 0 belong 0x05020000 Kerberos Keytab file