<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
The problem is not solved yet, so please help !!!<br>
In this mail I'll try to order all informations from (somehow) messy
previous mails.<br>
<br>
My goal is to start a legacy application as a D-Bus service on SuSE
10.3. <br>
The application is compiled on SuSE 10.3, it uses libdbus-glib-1.so2
and libdbus-1.so.3.<br>
<br>
The client application that uses the service is the QT application
started on the remote host running SuSE 11.2.<br>
<br>
The dbus-daemon V. 1.4.1 has been compiled and runs in verbose mode
on SuSE 10.3.<br>
<br>
The dbus-daemon listens on tcp connection
"tcp:host=192.168.0.10,port=12345". This is the address of the SuSE
10.3 host.<br>
The .config file (please see attachment) has
<allow_anonymous/> statement.<br>
<br>
The remote application authenticates via ANONYMOUS mechanism without
any problems.<br>
<br>
The service application attempts to authenticate via EXTERNAL and
DBUS_COOKIE_SHA1 mechanisms but it fails.<br>
In case of EXTERNALS D-bus claims lack of credentials, for
DBUS_COOKIE_SHA1 the application responses with "ERROR Don't have
the requested cookie Id"??? ) - please see the attached verbose.txt
file.<br>
<br>
The source code of the service application:<br>
<font face="Courier New, Courier, monospace">g_type_init ();<br>
<br>
dbus_g_object_type_install_info( MstkBody_TYPE_OBJECT,<br>
&dbus_glib_mstkBody_object_info);<br>
<br>
// this works with session D-Bus <br>
//bus = dbus_g_bus_get( DBUS_BUS_STARTER, &error );<br>
<br>
bus = dbus_g_connection_open( "tcp:host=192.168.0.10,port=12345",
&error );<br>
if (!bus)<br>
{<br>
cout << "Couldn't connect to d-bus. " <<
error->message << ". EXITING" << endl;<br>
// This is an essential problem so...<br>
exit(1);<br>
}<br>
<br>
bus_proxy = dbus_g_proxy_new_for_name( bus,<br>
"org.freedesktop.DBus",<br>
"/org/freedesktop/DBus",<br>
"org.freedesktop.DBus" );<br>
<br>
// fails here<br>
if( !dbus_g_proxy_call( bus_proxy,<br>
"RequestName",<br>
&error,<br>
G_TYPE_STRING,<br>
mstkBodyServiceName.c_str(),<br>
G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE,<br>
G_TYPE_INVALID,<br>
G_TYPE_UINT,<br>
&request_name_result,<br>
G_TYPE_INVALID) )<br>
{<br>
// exit if this does not work<br>
cout << "Error calling RequestName: " <<
error->message << endl;<br>
exit(1);<br>
}</font><br>
<br>
The application output looks like:<br>
<font face="Courier New, Courier, monospace"><br>
Error calling RequestName: Did not receive a reply. Possible
causes include: the remote application did not send a reply, the
message bus security policy blocked the reply, the reply timeout
expired, or the network connection was broken.</font><br>
<br>
Please let me know what can I do for the successful authentication?<br>
- where the credentials come from?<br>
- why the application does not response correctly to
DBUS_COOKIE_SHA1 mechanism?<br>
- why the SuSE 10.3 application does not use the ANONYMOUS
mechanism? Is there anything to do?<br>
With session daemon the authentication of the service application
works without problems - why?<br>
<br>
Thanks,<br>
<br>
with best regards<br>
<br>
Bogdan Lotko<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>