xref: /freebsd/contrib/file/magic/Magdir/kerberos (revision 193d9e768ba63fcfb187cfd17f461f7d41345048)
1
2#------------------------------------------------------------------------------
3# $File: kerberos,v 1.1 2014/12/10 18:45:43 christos Exp $
4# kerberos: MIT kerberos file binary formats
5#
6
7# This magic entry is for demonstration purposes and could be improved
8# if the following features were implemented in file:
9#
10# Strings inside [[ .. ]] in the descriptions have special meanings and
11# are not printed.
12#
13# 	- Provide some form of iteration in number of components
14#		[[${counter}=%d]] in the description
15#		then append
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
20#		XXX: Syntax:
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
26#
27# http://www.gnu.org/software/shishi/manual/html_node/\
28#	The-Keytab-Binary-File-Format.html
29#
30
310		name		keytab_entry
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
41#>>>>>>>>&0	belong		x
42#>>>>>>>>>>&0	use		keytab_entry
43
440		belong		0x05020000	Kerberos Keytab file
45>4		use		keytab_entry
46