win32 authentifaction problems after implementing new dbus authentification update

Ralf Habacker ralf.habacker at freenet.de
Thu Jun 21 07:10:32 PDT 2007


Hi,

with newest authentification changes dbus-test returns an error on win32.

<snip>
Testing auth:
    anonymous-client-successful.auth-script
    anonymous-server-successful.auth-script
    cancel.auth-script
    client-out-of-mechanisms.auth-script
    external-failed.auth-script
    external-root.auth-script
line 7 expected command 'OK' and got 'REJECTED EXTERNAL DBUS_COOKIE_SHA1
ANONYMOUS'
Unit test failed: auth

running the test with DBUS_VERBOSE=1 returns the following log.

2972: Sending 'AUTH EXTERNAL 30'
2972: server: got command "AUTH EXTERNAL 30"
2972: server: Trying mechanism EXTERNAL
2972: server: data: '0'
2972: server: desired identity not found in socket credentials
2972: server: Shutting down mechanism EXTERNAL
2972: server: going from state WaitingForAuth to state WaitingForAuth
2972: server: Sent 46 bytes of: REJECTED EXTERNAL DBUS_COOKIE_SHA1
ANONYMOUS^M

line 7 expected command 'OK' and got 'REJECTED EXTERNAL DBUS_COOKIE_SHA1
ANONYMOUS'


It looks like that the problem is caused by the ROOT_CREDENTIALS
statement which is evaluated in _dbus_auth_script_run()
...

     else if (_dbus_string_starts_with_c_str (&line,
                                               "ROOT_CREDENTIALS"))
        {
          auth_set_unix_credentials (auth, 0, DBUS_PID_UNSET);
        }
      else if (_dbus_string_starts_with_c_str (&line,
                                               "SILLY_CREDENTIALS"))
        {
          auth_set_unix_credentials (auth, 4312, DBUS_PID_UNSET);
        }


When i debug the code If found
$3 = (DBusCredentials *) 0xa904b8
(gdb) p *auth->credentials
$4 = {refcount = 1, unix_uid = 0, unix_pid = 4294967295, windows_sid = 0x0}
(gdb) p *auth->desired_identity
$5 = {refcount = 1, unix_uid = 4294967295, unix_pid = 4294967295,
  windows_sid = 0x3d4710 "0"}
(gdb)

Any idea how to fix this issue ?

Ralf






More information about the dbus mailing list