gnome-user-share fails to discover a port for webdav server

Bug #856732 reported by Adam Glasgall on 2011-09-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-user-share
Fix Released
Medium
gnome-user-share (Ubuntu)
Undecided
Unassigned

Bug Description

gnome-user-share (as of 3.0.0, as seen in Oneiric beta) tries to discover a free port to run Apache on by bind()ing a struct sockaddr_in with no port specified in src/http.c:get_port(). However, it neglects to specify an address family, so that attempt fails with EINVAL, and the -1 returned gets passed to spawn_httpd() as the port that Apache should be listening on, which causes to Apache promptly and silently bail. I've attached a debdiff that contains a patch fixing this by specifying AF_INET as the address family.

The attachment "Debdiff adding patch to fix port discovery for starting Apache from gnome-user-share" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-user-share - 3.0.0-2ubuntu3

---------------
gnome-user-share (3.0.0-2ubuntu3) oneiric; urgency=low

  * debian/patches/08_fix_port_discovery.patch:
    - Specify an address family in http.c:get_port() so that the bind()
      succeeds and we actually get a port. LP: #856732
 -- Adam Glasgall <email address hidden> Mon, 26 Sep 2011 11:08:49 -0400

Changed in gnome-user-share (Ubuntu):
status: New → Fix Released
Changed in gnome-user-share:
importance: Unknown → Medium
status: Unknown → New
Bernie Innocenti (codewiz) wrote :

Can we please backport this patch to natty? The patch is likely to apply cleanly to the gnome 2.x codebase as well.

Changed in gnome-user-share:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.