single native credential struct used for two purposes
@pwelche
Submitted by Patrick Welche Link to original bug (#735819)
Description
It seems that my credentials patch for NetBSD in Bug 728256 isn't quite right.
It is correct as it provides a way of getting the pid of the attached process using struct unpcid with the LOCAL_PEEREID socket option, but I failed to realise that having defined struct unpcid as the native structure, that same structure would also be used for the SCM_CRED message to retrieve credentials. The problem is that in NetBSD, SCM_CRED sendmsg() takes a struct sockcred.
struct sockcred is larger than struct unpcid, but does not contain a pid field.
So, it isn't obvious to me how to fix this properly as I need to squeeze two different structs (for gestsockopt() and sendmsg()) into a single glib native struct.
In the meantime, I suggest undefining G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED in the NetBSD case to correctly reflect reality.