Bug 131911 - [patch] ftp/mirror uses obsolete sockaddr_in format, fails on 7.X
Summary: [patch] ftp/mirror uses obsolete sockaddr_in format, fails on 7.X
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beech Rintoul
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 19:10 UTC by G. Paul Ziemba
Modified: 2009-02-22 20:50 UTC (History)
0 users

See Also:


Attachments
file.diff (7.65 KB, patch)
2009-02-20 19:10 UTC, G. Paul Ziemba
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description G. Paul Ziemba 2009-02-20 19:10:01 UTC
The ftp/mirror port's lchat.pl file uses the old pack('S n a4 x8', ...) method for constructing a sockaddr_in to pass to connect(). This approach breaks on more recent FreeBSDs which are more strict about the first two bytes of sockaddr_in.

Patch modifies lchat.pl to use perl's &Socket'pack_sockaddr_in and &Socket'unpack_sockaddr_in functions to do the right thing.

Fix: Patch attached.

Patch attached with submission follows:
How-To-Repeat: Run "mirror" and try to connect to any ftp site.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-02-20 19:13:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

beech@ wants this category PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2009-02-22 20:46:56 UTC
beech       2009-02-22 20:46:47 UTC

  FreeBSD ports repository

  Added files:
    ftp/mirror/files     patch-lchat.pl 
  Removed files:
    ftp/mirror/files     patch-af 
  Log:
  - The ftp/mirror port's lchat.pl file uses the old pack('S n a4 x8', ...)
    method for constructing a sockaddr_in to pass to connect().
    This approach breaks on more recent FreeBSDs which are more strict about
    the first two bytes of sockaddr_in.
  
  - Patch modifies lchat.pl to use perl's &Socket'pack_sockaddr_in and
    &Socket'unpack_sockaddr_in functions to do the right thing.
  
  PR:             ports/131911
  Submitted by:   G. Paul Ziemba <p-fbsd-bugs@ziemba.us>
  
  Revision  Changes    Path
  1.3       +0 -58     ports/ftp/mirror/files/patch-af (dead)
  1.1       +164 -0    ports/ftp/mirror/files/patch-lchat.pl (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Beech Rintoul freebsd_committer freebsd_triage 2009-02-22 20:47:11 UTC
State Changed
From-To: open->closed

Committed, Thanks!