mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 23:43:39 +02:00
gdbus: support unix:dir= addresses
unix:dir= addresses are exactly the same as unix:tmpdir= addresses, already supported by GDBus, except they forbid use of abstract sockets. This is convenient for situations where abstract sockets are impermissible, such as when a D-Bus client inside a network namespace needs to connect to a server running in a different network namespace. An abstract socket cannot be shared between two processes in different network namespaces. Applications could use unix:path= addresses instead, so this is only a convenience, but there's no good reason not to support unix:dir=. Currently it is not supported simply because unix:dir= is a relatively recent addition to the D-Bus spec.
This commit is contained in:
@@ -113,9 +113,13 @@ test_unix_address (void)
|
||||
g_assert_false (g_dbus_is_address ("unix:path=/foo;abstract=/bar"));
|
||||
assert_is_supported_address ("unix:path=/tmp/concrete;unix:abstract=/tmp/abstract");
|
||||
assert_is_supported_address ("unix:tmpdir=/tmp");
|
||||
assert_is_supported_address ("unix:dir=/tmp");
|
||||
assert_not_supported_address ("unix:tmpdir=/tmp,path=/tmp");
|
||||
assert_not_supported_address ("unix:tmpdir=/tmp,abstract=/tmp/foo");
|
||||
assert_not_supported_address ("unix:tmpdir=/tmp,dir=/tmp");
|
||||
assert_not_supported_address ("unix:path=/tmp,abstract=/tmp/foo");
|
||||
assert_not_supported_address ("unix:path=/tmp,dir=/tmp");
|
||||
assert_not_supported_address ("unix:abstract=/tmp/foo,dir=/tmp");
|
||||
assert_not_supported_address ("unix:");
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user