Commit graph

3621 commits

Author SHA1 Message Date
Chengwei Yang
014ea55625 Ignore more unused staff if build with tests but without asserts
https://bugs.freedesktop.org/show_bug.cgi?id=66069
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22 20:03:06 +01:00
Chengwei Yang
15bc915d74 Doc: fix incorrect param names, missing params, non-exist params
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65755
2013-08-22 20:01:08 +01:00
Ivan Romanov
0928169cf8 Use iface instead of interface in function parameters
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66493
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22 19:11:23 +01:00
Simon McVittie
82d37b93ec Document GetAdtAuditSessionData and GetConnectionSELinuxSecurityContext
These are only part of the DBus interface because dbus-daemon didn't
previously support multiple interfaces. I don't know enough about
either of these security frameworks to know what they return, but
perhaps one day someone who knows about Solaris or SELinux will tell
us...

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-08-22 18:22:14 +01:00
Simon McVittie
4b63567c02 GetConnectionCredentials: add
The initial set of credentials is just UnixUserID and ProcessID.
The rest can follow when someone is sufficiently interested to actually
test them.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[rename a function that Ralf found unclear -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22 18:21:58 +01:00
Chengwei Yang
46af309cf5 Fix build with "--enable-stats"
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22 18:17:49 +01:00
Simon McVittie
eca135456b Merge branch 'dbus-1.6'
Conflicts:
	NEWS
2013-08-22 18:03:59 +01:00
Simon McVittie
5ad2668fb3 NEWS for 1.6 2013-08-22 18:03:24 +01:00
Simon McVittie
039758ca69 NEWS 2013-08-22 18:02:42 +01:00
Ralf Habacker
bc02680c69 Fixed compiler warning on windows.
https://bugs.freedesktop.org/show_bug.cgi?id=61874
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-19 21:29:26 +02:00
Ralf Habacker
006c5750b3 Documentation fix.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29666
Reviewed-by: Chengwei Yang <chengwei.yang.cn@gmail.com>
2013-08-15 10:43:10 +02:00
Ralf Habacker
9554ca9d9f Fixed remaining issues.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:54:59 +02:00
Ralf Habacker
8a76654a43 Add debug messages to load_ex_ip_helper_procedures().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:53:28 +02:00
Ralf Habacker
9cc21aa001 Refactored get_pid_from_extended_tcp_table() and get_pid_from_tcp_ex_table() to be more equal.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:53:22 +02:00
Ralf Habacker
2fd9e2c255 Fix for broken wine AllocateAndGetTcpExTableFromStack() implementation.
On wine (tested with 1.5.6) the mentioned function could not be located in
iphlpapi.dll using LoadLibrary()/GetProcAddress(), which is the prefered
method to get a tcp peer pid on WinXP <= SP2.
To workaround this limitation we use GetExtendedTcpTable() first to get the peer pid.
If this fails (which happens at least on real WinXP SP2) we then use
AllocateAndGetTcpExTableFromStack() to get the pid.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:53:16 +02:00
Ralf Habacker
0b2b6cba92 Add doc to load_ex_ip_helper_procedures().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:52:37 +02:00
Ralf Habacker
4886ff454e Only take process id of localhost client connection entries.
This patch makes sure, that the process id is fetched only from localhost
 client address connections fetched from the tcp table.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:52:32 +02:00
Ralf Habacker
d6b67a0383 Fixed bug of unsupported GetExtendTcpTable() on Windows XP SP2 and earlier.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-09 17:52:28 +02:00
Ralf Habacker
2f24bc8616 Dump fetched sid on return of _dbus_getsid().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-07 17:02:18 +02:00
Ralf Habacker
a5c21d3874 Add WINXP <= SP3 support to _dbus_getsid().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-07 17:02:14 +02:00
Colin Walters
2de11abd56 test/marshal: Ensure we use suitably aligned buffers
This test was failing on s390; though it could fail
on other platforms too.  Basically we need to be sure
we're passing at least word-aligned buffers to the
demarshalling code.  malloc() will do that for us.

https://bugs.freedesktop.org/show_bug.cgi?id=67279
2013-07-24 17:52:58 -04:00
Simon McVittie
9587ddb917 NEWS for 1.7.x 2013-07-01 12:24:53 +01:00
Chengwei Yang
8cda82b726 cmake: do not bind to any particular POSIX C standard
This caused build failures on FreeBSD. Defining _POSIX_C_SOURCE to
a particular version will disable common non-POSIX extensions like
PF_UNIX, and on some systems will also disable features of later
POSIX versions, like IPv6. If we don't ask for a specific version,
we'll get some sort of sensible default.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
[made the commit message more concise -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-07-01 12:18:11 +01:00
Simon McVittie
61ef4139c4 Merge branch 'dbus-1.6'
Conflicts:
	NEWS
2013-07-01 12:16:05 +01:00
Simon McVittie
d9dc58efce NEWS for 1.6.x 2013-07-01 12:15:04 +01:00
Simon McVittie
00c1c0ac1f Make the test for #53499 more obviously correct 2013-07-01 12:14:02 +01:00
Chengwei Yang
cef5a419f4 Test: add a test case for escaping byte > 127
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53499
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-07-01 12:11:39 +01:00
Chengwei Yang
32e5cab56a Fix: a non ascii byte will trigger BadAddress error
If a byte in DBusString *unescaped isn't a ascii byte, which will be
cast to char (signed char on most of platform), so that's the issue
unsigned char cast to signed char. e.g. "\303\266" is a valid unicode
character, if everything goes right, it will be escaped to "%c3%b6".
However, in fact, it escaped to "%<garbage-byte>3%<garbage-byte>6".

_dbus_string_append_byte_as_hex() take an int parameter, so negative
byte is valid, but cause get a negative index in array. So garbage value
will get. e.g. '\303' --> hexdigits[((signed byte)(-61)) >> 4] is
hexdigits[-4].

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53499
Sgne-off-by: Chengwei Yang <chengwei.yang@intel.com>
[fixed whitespace -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-07-01 12:09:02 +01:00
Chengwei Yang
0cb7d487bc tests to embedded tests: replaced in cmake files
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:18:32 +01:00
Chengwei Yang
134701b758 tests to embedded tests: replaced in automake files
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:17:15 +01:00
Chengwei Yang
4df8738794 tests to embedded tests: replaced in libdbus
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:15:53 +01:00
Chengwei Yang
11c5dc126e tests to embedded tests: replaced in tools
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:14:00 +01:00
Chengwei Yang
db2757f812 tests to embedded tests: replaced in dbus-daemon
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:13:28 +01:00
Chengwei Yang
dec9025626 DBusString: fix a typo
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
[separated out of a larger patch -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66300
2013-06-28 12:09:20 +01:00
Simon McVittie
a73058a45c NEWS for 33001 2013-06-28 12:03:05 +01:00
Chengwei Yang
1ec2e5a538 cmake: align dir watch backend detection with autotools
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28 11:55:52 +01:00
Chengwei Yang
982bfa106d cmake: terminate to generate makefiles due to fatal error
FATAL isn't a valid key for message according to cmake document here.
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3amessage

Due to the real fatal error, FATAL_ERROR should be used to terminate
cmake from continue generating makefiles.

Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28 11:55:38 +01:00
Chengwei Yang
6af363bbbc cmake: get rid of useless commented out code
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28 11:54:58 +01:00
Chengwei Yang
1f9e5d70c7 dir-watch: remove dnotify backend
dnotify as a dir watch backend is broken since Jan 2010 (almost 3.5
years). According to fd.o: #33001, it's no harm to remove dnotify from
this project.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33001
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28 11:53:29 +01:00
Chengwei Yang
2dfb5ff69b cmake: clean up libxml2 glue
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28 11:50:57 +01:00
Simon McVittie
0c20a0b38e NEWS for master 2013-06-28 11:47:15 +01:00
Simon McVittie
0024396002 Merge branch 'dbus-1.6'
Conflicts:
	NEWS
2013-06-28 11:38:33 +01:00
Simon McVittie
160fbc9ec1 NEWS 2013-06-28 11:37:28 +01:00
Chengwei Yang
f023c0e265 Remove invoke of va_end before va_start
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66300
2013-06-28 11:35:49 +01:00
Chengwei Yang
5fdb93a49c Fix two small typos in README.win
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66300
2013-06-28 11:35:13 +01:00
Chengwei Yang
23fa534a0a kqueue: remove unused variable
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66035
2013-06-26 15:28:57 +01:00
Chengwei Yang
eec093bbdb dbus-launch: do not verbose output if build with verbose mode disabled
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66068
2013-06-26 15:23:35 +01:00
Chengwei Yang
8aa07c7e48 dbus-launch: align document
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66068
2013-06-26 15:23:11 +01:00
Chengwei Yang
973684f022 dbus-launch: fix coding style
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66068
2013-06-26 15:22:35 +01:00
Chengwei Yang
9665b8ecd8 FreeBSD: explicit include signal.h to fix build failure
In Linux envrionment, signal.h included by sys/wait.h, however, this
isn't the case in FreeBSD. So explicit include it to fix build failure.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66197
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-26 13:04:01 +01:00