mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Cc: alpine-devel@lists.alpinelinux.org
Subject: Re: Re: cups debugging, continued...ugly patch
Date: Mon, 30 Jun 2014 03:03:53 -0400	[thread overview]
Message-ID: <20140630070353.GG179@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140630053426.GC16088@newbook>

On Sun, Jun 29, 2014 at 10:34:27PM -0700, Isaac Dunham wrote:
> Thanks to Rich's comment, I've found a solution that works here.
> The patch doesn't exactly look nice, though.

I agree it's ugly. The clean way to do it would be to use getaddrinfo
to request an AI_PASSIVE address for the desired family. Then you get
the right sockaddr type and size for free, and you can subsequently
fill in the port to try. That wouldn't work for AF_LOCAL (at least not
on musl) but this whole function makes no sense for AF_LOCAL.

Of course binding a reserved port like this is a serious security
smell -- it sounds like they're trying to facilitate port-based
authentication, which is unsafe if used for anything except localhost.

I would see if it's possible to remove the binding completely and have
it work. Remote lpd's would not be able to trust the ldp that omits
the bind based on its port, but this kind of trust is fundamentally
wrong and insecure anyway. If such a trust relationship is needed, a
proper authentication channel must be used.

Rich


  parent reply	other threads:[~2014-06-30  7:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140629194829.GA1994@newbook>
     [not found] ` <20140630001201.GA14838@newbook>
2014-06-30  1:28   ` cups debugging, continued Isaac Dunham
2014-06-30  2:03     ` Rich Felker
2014-06-30  4:35       ` Isaac Dunham
2014-06-30  5:34         ` cups debugging, continued...ugly patch Isaac Dunham
2014-06-30  6:21           ` Luca Barbato
2014-06-30  6:58             ` Rich Felker
2014-06-30  7:03           ` Rich Felker [this message]
2014-06-30 19:43             ` James Cloos
2014-07-01  1:14               ` Rich Felker
2014-07-01 14:19           ` [alpine-devel] " Natanael Copa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140630070353.GG179@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=alpine-devel@lists.alpinelinux.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).