Alexander Larsson ec91ed00f1 Detect "empty" socket credentials on Linux
Linux uses struct ucred to pass over socket credentials. Historically
this has always worked in recievemsg, if SO_PASSCRED was set on the socket,
even if the remote side didn't pass any credits. But this change broke that:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=16e5726269611b71c930054ffe9b858c1cea88eb;hp=a9e9fd7182332d0cf5f3e601df3e71dd431b70d7

However, it doesn't actually fail getting the credentials, it just returns
an "empty" one, as initialized by cred_to_ucred() at:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=net/core/sock.c;h=b29ab61b029cf7f76fda992ecfcb8dcaa06b0483;#l756

So, we detect this and fail the credentials reading.

This actually happened in real life with gdbus acting as a server, as
gdbus expected an ucred but libdbus didn't send one.
2012-04-12 16:43:49 +02:00
..
2012-03-05 06:18:24 -05:00
2012-04-10 16:39:49 -04:00
2010-09-02 22:36:47 +03:00
2011-09-04 17:50:41 -04:00
2012-02-08 08:51:34 -05:00
2011-06-04 10:45:54 -04:00
2009-03-31 19:39:16 -04:00
2012-02-02 16:22:42 +01:00
2011-12-10 17:23:28 -05:00
2011-12-10 17:23:28 -05:00
2011-12-08 18:05:14 -05:00
2010-07-12 18:30:14 -04:00
2010-07-05 00:56:12 -04:00
2010-03-26 09:30:25 -04:00
2010-07-12 18:30:14 -04:00
2010-07-12 18:30:14 -04:00
2010-07-12 18:30:14 -04:00
2010-07-07 19:53:22 -04:00
2012-03-27 12:45:27 -04:00
2012-01-01 19:01:14 +01:00
2012-04-04 15:23:31 -04:00
2012-01-25 21:05:27 -05:00
2011-06-07 08:55:31 +08:00
2011-08-29 14:49:32 -04:00
2011-08-29 14:49:32 -04:00
2010-07-07 19:53:22 -04:00
2011-02-08 10:05:00 -05:00
2011-12-08 18:05:13 -05:00
2011-12-08 18:05:12 -05:00
2012-02-18 09:22:31 +00:00
2011-12-10 21:46:39 -05:00
2011-02-08 10:05:00 -05:00
2012-04-04 15:23:31 -04:00
2010-06-04 19:03:38 +02:00
2010-11-28 23:55:43 -05:00
2011-06-04 18:48:19 -04:00
2010-08-19 16:32:37 -04:00
2011-08-29 14:49:32 -04:00
2012-04-06 21:22:17 -04:00
2012-02-03 15:05:43 +01:00
2012-01-13 17:12:57 +01:00
2011-01-09 21:45:20 +01:00
2011-08-29 14:49:32 -04:00
2010-04-16 23:23:40 -04:00
2012-01-27 03:00:23 -05:00
2011-12-08 18:05:14 -05:00
2012-01-06 16:58:57 +07:00
2011-10-16 21:41:15 -04:00
2012-02-21 01:10:54 +01:00
2011-10-02 22:33:10 -04:00
2011-06-14 18:51:57 -04:00
2011-05-05 14:09:11 -04:00
2011-10-03 14:06:47 -04:00
2012-01-13 17:12:57 +01:00
2009-07-05 22:35:55 -04:00
2011-08-29 14:49:32 -04:00
2010-07-07 19:53:22 -04:00