xref: /dflybsd-src/contrib/file/magic/Magdir/kerberos (revision 6fca56fb90a257291c53bba3b861b751027c3e3d)
1*82c5fa3eSPeter Avalos
2*82c5fa3eSPeter Avalos#------------------------------------------------------------------------------
36fca56fbSSascha Wildner# $File: kerberos,v 1.3 2019/04/19 00:42:27 christos Exp $
4*82c5fa3eSPeter Avalos# kerberos: MIT kerberos file binary formats
5*82c5fa3eSPeter Avalos#
6*82c5fa3eSPeter Avalos
7*82c5fa3eSPeter Avalos# This magic entry is for demonstration purposes and could be improved
8*82c5fa3eSPeter Avalos# if the following features were implemented in file:
9*82c5fa3eSPeter Avalos#
10*82c5fa3eSPeter Avalos# Strings inside [[ .. ]] in the descriptions have special meanings and
11*82c5fa3eSPeter Avalos# are not printed.
12*82c5fa3eSPeter Avalos#
13*82c5fa3eSPeter Avalos# 	- Provide some form of iteration in number of components
14*82c5fa3eSPeter Avalos#		[[${counter}=%d]] in the description
15*82c5fa3eSPeter Avalos#		then append
16*82c5fa3eSPeter Avalos#		[${counter}--] in the offset of the entries
17*82c5fa3eSPeter Avalos#	- Provide a way to round the next offset
18*82c5fa3eSPeter Avalos#		Add [R:4] after the offset?
19*82c5fa3eSPeter Avalos#	- Provide a way to have optional entries
20*82c5fa3eSPeter Avalos#		XXX: Syntax:
21*82c5fa3eSPeter Avalos#	- Provide a way to "save" entries to print them later.
22*82c5fa3eSPeter Avalos#		if the description is [[${name}=%s]], then nothing is
23*82c5fa3eSPeter Avalos#		printed and a subsequent entry in the same magic file
24*82c5fa3eSPeter Avalos#		can refer to ${name}
25*82c5fa3eSPeter Avalos#	- Provide a way to format strings as hex values
26*82c5fa3eSPeter Avalos#
276fca56fbSSascha Wildner# https://www.gnu.org/software/shishi/manual/html_node/\
28*82c5fa3eSPeter Avalos#	The-Keytab-Binary-File-Format.html
29*82c5fa3eSPeter Avalos#
30*82c5fa3eSPeter Avalos
31*82c5fa3eSPeter Avalos0		name		keytab_entry
32*82c5fa3eSPeter Avalos#>0		beshort		x		\b, size=%d
33*82c5fa3eSPeter Avalos#>2		beshort		x		\b, components=%d
34*82c5fa3eSPeter Avalos>4		pstring/H	x		\b, realm=%s
35*82c5fa3eSPeter Avalos>>&0		pstring/H	x		\b, principal=%s/
36*82c5fa3eSPeter Avalos>>>&0		pstring/H	x		\b%s
37*82c5fa3eSPeter Avalos>>>>&0		belong		x		\b, type=%d
38*82c5fa3eSPeter Avalos>>>>>&0		bedate		x		\b, date=%s
39*82c5fa3eSPeter Avalos>>>>>>&0	byte		x		\b, kvno=%u
40*82c5fa3eSPeter Avalos#>>>>>>>&0	pstring/H	x
41*82c5fa3eSPeter Avalos#>>>>>>>>&0	belong		x
42*82c5fa3eSPeter Avalos#>>>>>>>>>>&0	use		keytab_entry
43*82c5fa3eSPeter Avalos
44*82c5fa3eSPeter Avalos0		belong		0x05020000	Kerberos Keytab file
45*82c5fa3eSPeter Avalos>4		use		keytab_entry
46