kerberos 1.4 KB

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