Bug 88858 - Failed to bind socket "127.0.0.1:444": Permission denied
Summary: Failed to bind socket "127.0.0.1:444": Permission denied
Status: RESOLVED DUPLICATE of bug 87999
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 07:18 UTC by Ralf Habacker
Modified: 2015-02-07 12:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test case (1.83 KB, text/plain)
2015-01-29 07:18 UTC, Ralf Habacker
Details

Description Ralf Habacker 2015-01-29 07:18:06 UTC
Created attachment 112929 [details]
test case

Running the cross compiled test-tcp executable from the appended test case with wine 1.7.35 on opensuse 13.1 x86_64 shows the following error messages several times:

173: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:137": Permission denied
218: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:488": Permission denied
309: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:1002": Permission denied
350: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:150": Permission denied
370: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:657": Permission denied
443: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:160": Permission denied
447: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:195": Permission denied
575: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:219": Permission denied
610: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:938": Permission denied
616: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:951": Permission denied
664: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:405": Permission denied
725: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:700": Permission denied
734: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:208": Permission denied
841: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:965": Permission denied
860: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:697": Permission denied
864: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:920": Permission denied
930: org.freedesktop.DBus.Error.Failed Failed to bind socket "127.0.0.1:940": Permission denied
Comment 1 Simon McVittie 2015-01-29 11:13:16 UTC
This is something that Wine cannot accurately emulate. On Linux, only root may bind to ports < 1024; on Windows, anyone may do so. So this behaviour would be fine on real Windows, but is not OK under Wine.

If libdbus is calling (pseudocode) bind(address=127.0.0.1, port=0) then I would expect the kernel (or the part of Wine that emulates the Windows kernel) to give it a high port number. That's what happens on native Linux.
Comment 2 Simon McVittie 2015-02-06 17:30:49 UTC
Was this before we fixed the incorrect endianness thing?

If so, then it's probably fixed now. I suspect that what happened is:

* we call bind() with port 0
* the kernel gives us port 48129 (0xbc01)
* we store the byteswapped port number 444 (0x01bc) and do the goto
* we call bind() with the incorrect port 444
* the kernel says no, because 444 < 1024

If it works for you now (manual-tcp worked for me while I was preparing 1.9.8) then we can close this as a dup of Bug #87999.
Comment 3 Ralf Habacker 2015-02-07 12:05:29 UTC
(In reply to Simon McVittie from comment #2)
> Was this before we fixed the incorrect endianness thing?
> 
> If so, then it's probably fixed now. I suspect that what happened is:
> 
> * we call bind() with port 0
> * the kernel gives us port 48129 (0xbc01)
> * we store the byteswapped port number 444 (0x01bc) and do the goto
> * we call bind() with the incorrect port 444
> * the kernel says no, because 444 < 1024
> 
> If it works for you now (manual-tcp worked for me while I was preparing
> 1.9.8) then we can close this as a dup of Bug #87999.

Works for me too, thanks for investigation.

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


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.