Skip to content
Advertisement

What is the internal format of .Xauthority file?

Well, the subject.

I have searched a lot, but unfortunately, found nothing. Is there some document describing this format? Or the structure need to be extracted out from the xauth source files?

Advertisement

Answer

Probably not exactly what you are looking for but putting in an answer just for the formatting.

The .Xauthority is an array of structures:

JavaScript

You would probably still need to be able to decode each entry — if nothing else by slogging through the source:Xauth.h

For example:

JavaScript

The first short is 0x100 indicating the family

The next short is 0x0007 indicating the length of the address

The next 7 bytes are the address: maximus

The next short is 0001, the length of the seat number

The next byte is 30, ascii 0, the seat number

The next short is 0x0012, decimal 18, the length of the name

The next 18 bytes are the name: MIT-MAGIC-COOKIE-1

The next short is 0x0010, decimal 16, the length of the data

And the next 16 bytes are the data: 0xc0ac thru 0x254e.

Then it starts over.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement