X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from brightrain.aerifal.cx (216-12-86-13.cv.mvl.ntelos.net [216.12.86.13]) by mail.alpinelinux.org (Postfix) with ESMTP id D09C8DC0169 for ; Mon, 30 Jun 2014 02:04:11 +0000 (UTC) Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1X1Qw3-0001Za-00; Mon, 30 Jun 2014 02:03:11 +0000 Date: Sun, 29 Jun 2014 22:03:11 -0400 From: Rich Felker To: musl@lists.openwall.com Cc: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] Re: [musl] cups debugging, continued Message-ID: <20140630020311.GD179@brightrain.aerifal.cx> References: <20140629194829.GA1994@newbook> <20140630001201.GA14838@newbook> <20140630012830.GA16088@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140630012830.GA16088@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Rich Felker On Sun, Jun 29, 2014 at 06:28:31PM -0700, Isaac Dunham wrote: > On Sun, Jun 29, 2014 at 05:12:01PM -0700, Isaac Dunham wrote: > > Now I hit the next issue: the 'lpd' backend reports > > 'Unable to reserve port: Invalid argument' > > And I need to figure out what's causing this--or rather, what the solution is. > > Right now, I'm stuck (lpd is the main way to access it, and it isn't working). > OK, now we're in cups-1.7.3/backend/lpd.c: > > ....the problem is a local implementation of rresvport_af(), trying to reserve > a port but failing. > > And strace -p `pidof lpd` says this: > Process 16113 attached > restart_syscall(<... resuming interrupted call ...>) = 0 > geteuid32() = 0 > socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7 > bind(7, {sa_family=AF_INET, sin_port=htons(905), sin_addr=inet_addr("0.0.0.0")}, 256) = -1 EINVAL (Invalid argument) Where did the value of 256 for socklen_t come from? That's almost surely the cause of the EINVAL. sockaddr_in should have a length of 16, not 256. Rich --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---