<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Pavel,<br>
<br>
Thanks for you help, the problem is alread<font face="Arial">y
solved. The new dbus-daem</font>on uses different (shorter) time
stamp in the keyring file, then the old one (the old one used the
epoch-time in seconds, the new one only 4 0r 5 digits). <br>
<br>
The solution is to change the<br>
<pre wrap="">#define HAVE_MONOTONIC_CLOCK 1
<font face="Arial">statement in the config.h file (after configure) to the </font>
</pre>
<pre wrap="">#undef HAVE_MONOTONIC_CLOCK.
<big><font face="Helvetica, Arial, sans-serif">Then the old and new dbus libraries work together.</font></big>
<big><font face="Helvetica, Arial, sans-serif">Thank you for your readiness to help,
with best regards,
Bogdan
</font></big>
</pre>
On 5/27/2011 23:23, Pavel Strashkin wrote:
<blockquote
cite="mid:BANLkTi=Ed5_HTX1-KdLrPTW7Z6O1XfzmPw@mail.gmail.com"
type="cite">
<pre wrap="">Could you provide verbose files for both server and client? I see that
server supports ANONYMOUS and sends information to the client about
it, but client doesn't try to use it, only first two (EXTERNAL,
DBUS_COOKIE_SHA1).
2011/5/25 Bogdan Lotko <a class="moz-txt-link-rfc2396E" href="mailto:boguslaw.lotko@chello.at"><boguslaw.lotko@chello.at></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Hello,
The problem is not solved yet, so please help !!!
In this mail I'll try to order all informations from (somehow) messy
previous mails.
My goal is to start a legacy application as a D-Bus service on SuSE 10.3.
The application is compiled on SuSE 10.3, it uses libdbus-glib-1.so2 and
libdbus-1.so.3.
The client application that uses the service is the QT application started
on the remote host running SuSE 11.2.
The dbus-daemon V. 1.4.1 has been compiled and runs in verbose mode on SuSE
10.3.
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.
The .config file (please see attachment) has <allow_anonymous/> statement.
The remote application authenticates via ANONYMOUS mechanism without any
problems.
The service application attempts to authenticate via EXTERNAL and
DBUS_COOKIE_SHA1 mechanisms but it fails.
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.
The source code of the service application:
g_type_init ();
dbus_g_object_type_install_info( MstkBody_TYPE_OBJECT,
&dbus_glib_mstkBody_object_info);
// this works with session D-Bus
//bus = dbus_g_bus_get( DBUS_BUS_STARTER, &error );
bus = dbus_g_connection_open( "tcp:host=192.168.0.10,port=12345", &error );
if (!bus)
{
cout << "Couldn't connect to d-bus. " << error->message << ". EXITING" <<
endl;
// This is an essential problem so...
exit(1);
}
bus_proxy = dbus_g_proxy_new_for_name( bus,
"org.freedesktop.DBus",
"/org/freedesktop/DBus",
"org.freedesktop.DBus" );
// fails here
if( !dbus_g_proxy_call( bus_proxy,
"RequestName",
&error,
G_TYPE_STRING,
mstkBodyServiceName.c_str(),
G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE,
G_TYPE_INVALID,
G_TYPE_UINT,
&request_name_result,
G_TYPE_INVALID) )
{
// exit if this does not work
cout << "Error calling RequestName: " << error->message << endl;
exit(1);
}
The application output looks like:
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.
Please let me know what can I do for the successful authentication?
- where the credentials come from?
- why the application does not response correctly to DBUS_COOKIE_SHA1
mechanism?
- why the SuSE 10.3 application does not use the ANONYMOUS mechanism? Is
there anything to do?
With session daemon the authentication of the service application works
without problems - why?
Thanks,
with best regards
Bogdan Lotko
_______________________________________________
dbus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/dbus">http://lists.freedesktop.org/mailman/listinfo/dbus</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>