From owner-freebsd-hackers@FreeBSD.ORG Tue May 27 01:30:55 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1A87106566B for ; Tue, 27 May 2008 01:30:55 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id 803D08FC0A for ; Tue, 27 May 2008 01:30:55 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.14.2/8.14.2) with ESMTP id m4R11huq075005; Mon, 26 May 2008 18:01:43 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.14.2/8.14.2/Submit) id m4R11fEq075003; Mon, 26 May 2008 18:01:41 -0700 (PDT) (envelope-from steve) Message-Id: <200805270101.m4R11fEq075003@wattres.watt.com> X-Newsgroups: local.freebsd-hackers In-Reply-To: <7EB9398C5B46415B96D2C20A2E261E13@multiplay.co.uk> From: steve@Watt.COM (Steve Watt) References: <483B05DB.3000309@FreeBSD.org> <200805261936.m4QJaS7Q074045@apollo.backplane.com> Organization: Watt Consultants, San Jose, CA, USA Date: Mon, 26 May 2008 18:01:40 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: killing@multiplay.co.uk X-Archived: 1211850103.497617357@wattres.Watt.COM X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wattres.watt.com [127.0.0.1]); Mon, 26 May 2008 18:01:43 -0700 (PDT) Cc: hackers@freebsd.org Subject: Re: Using sendmsg for SCM_CREDS results in EINVAL on PF_INET socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 01:30:55 -0000 In <7EB9398C5B46415B96D2C20A2E261E13@multiplay.co.uk>, Steven Hartland wrote: [ Attributions fatally damaged, removing ] >> :> using the following code to send credentials to a remote host >> :> results in EINVAL from sendmsg. >> :> >> :> I suspect that SCM_CREDS is only valid for PF_LOCAL / PF_UNIX >> :> sockets and not PF_INET sockets and hence the code in dbus >> :> is actually invalid. >> :> >> :> Can anyone confirm this is the case or not? >> : >> :What would it even mean to send credentials to a remote host over an >> :AF_INET socket? >> >> The only way to do it is to do a connect-back to a secure port. In >> otherwords, to use the identd protocol. >> >> Control messages like SCM_CREDS (and descriptor passing for that matter) >> only work over local protocol sockets. > >Thank you for the confirmation guys. I'll look to create a patch >I can submit to the dbus project to disable the use of SCM_CREDS >when using PF_UNIX sockets. I think you got the sense backwards here; SCM_CREDS is OK when using PF_UNIX / PF_LOCAL. It's PF_INET that shouldn't be going there. Steve -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3" Internet: steve @ Watt.COM Whois: SW32-ARIN Free time? There's no such thing. It just comes in varying prices...