On 20/02/15 12:43, David Herrmann wrote:
-1 is not a valid value. It should be silently dropped, so we're fine here.

Perhaps I'm misunderstanding what you're saying here and we're actually agreeing, but for clarity:

The specification for GetConnectionCredentials deliberately does not document any invalid values; members of the returned a{sv} should only appear if their values are valid. If ((uint32_t) -1) is in fact never a valid value for a UnixUserID or ProcessID, then the pairs { "UnixUserID": (uint32_t) -1 } and { "ProcessID": (uint32_t) -1 } should never appear in the a{sv} at all.

Similarly, for LinuxSecurityLabel, if getsockopt SO_PEERSEC (or the closest kdbus equivalent) fails, or if the kdbus message does not contain the necessary information, the keys of the a{sv} should not include LinuxSecurityLabel: the absence of a security label looks like {}, not { "LinuxSecurityLabel": [] } or
{ "LinuxSecurityLabel": [ '\0' ] }.

--
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to