Bug 25207 - debug print displays wrong server sid/uid as client sid/uid
Summary: debug print displays wrong server sid/uid as client sid/uid
Status: RESOLVED DUPLICATE of bug 25213
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Thiago Macieira
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 14:08 UTC by Ralf Habacker
Modified: 2009-11-30 03:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
added patch in git format (1.09 KB, patch)
2009-11-21 01:00 UTC, Ralf Habacker
Details | Splinter Review

Description Ralf Habacker 2009-11-20 14:08:43 UTC
Authentifications with DBUS_COOKIE_SHA1 auth prints a message if server and client sid/uid are different. 

In recent implementations (I looked into git dbus-1.2 and master branch) the log print contains the server id as client id, which is wrong. An example is displayed below: 

272: Client authorized as SID 'S-1-5-18' but our SID is 'S-1-5-18',  disconnecting

Index: dbus/dbus-transport.c
===================================================================
--- dbus/dbus-transport.c    (Revision 812)
+++ dbus/dbus-transport.c    (Arbeitskopie)
@@ -651,12 +651,12 @@
       if (_dbus_credentials_include(our_identity,DBUS_CREDENTIAL_WINDOWS_SID))
           _dbus_verbose ("Client authorized as SID '%s'"
                          " but our SID is '%s', disconnecting\n",
-                         _dbus_credentials_get_windows_sid(our_identity),
+                         _dbus_credentials_get_windows_sid(auth_identity),
                          _dbus_credentials_get_windows_sid(our_identity));
       else
           _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT
                          " but our UID is "DBUS_UID_FORMAT", disconnecting\n",
-                         _dbus_credentials_get_unix_uid(our_identity),
+                         _dbus_credentials_get_unix_uid(auth_identity),
                          _dbus_credentials_get_unix_uid(our_identity));
       _dbus_transport_disconnect (transport);
       allow = FALSE;

---- Changelog Entry --------------------------------------------------

2009-11-20  Ralf Habacker <ralf.habacker@freenet.de>

	* dbus/dbus-transport.c(auth_via_default_rules): fixed incorrect  displayed client sid/uid value
Comment 1 Thiago Macieira 2009-11-21 00:50:15 UTC
Would you mind attaching a Git commit as a patch?
Comment 2 Ralf Habacker 2009-11-21 01:00:25 UTC
Created attachment 31364 [details] [review]
added patch in git format 

provided patch for git
Comment 3 Tor Lillqvist 2009-11-21 02:09:55 UTC
Btw, this has already been handled in April in the dbus4win fork (and originally in my patch from last year), and is part of the suggested merge back (cherry-pick extravaganze) of the dbus4win code into dbus master.
Comment 4 Ralf Habacker 2009-11-21 04:38:52 UTC
Tor, then you can take it out of the patch. 

Comment 5 Ralf Habacker 2009-11-21 04:46:04 UTC
Tor, this patch shows the way to merge the big one patch you refered into upstream. 

The big patch should be splitted into peaces with a specific context (for example automake build system, cmake build system, windows only fixes and main code fixes). 

Comment 6 Tor Lillqvist 2009-11-21 04:56:33 UTC
Of course, that is exactly what I did. 

I quote my mail:

  I spent some hours cherry-picking most of the commits from the
  dbus4win-noncetcp branch of the dbus4win git repository to the master
  branch of my local clone of the upstream dbus repository. 

Did you check the http://tml.pp.fi/dbus-dbus4win-merge.diff I pointed to in my mai? It is the output of git format-patch, so there are indeed separate easily digestable pieces. (114 of them...)

Do I understand correctly that you now then want the small pieces to be combined together again into a small number of larger patches? Is that really worth it? The amount of patch lines to review won't get any smaller by that.
Comment 7 Ralf Habacker 2009-11-21 05:45:48 UTC
I created a dedicated bug https://bugs.freedesktop.org/show_bug.cgi?id=25213 for further discussion of the merge. 

Comment 8 Ralf Habacker 2009-11-30 03:24:10 UTC

*** This bug has been marked as a duplicate of bug 25213 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.