From owner-freebsd-hackers@FreeBSD.ORG Mon May 26 20:19:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0E28106566C; Mon, 26 May 2008 20:19:33 +0000 (UTC) (envelope-from prvs=1032b0b9a9=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 29EE18FC15; Mon, 26 May 2008 20:19:32 +0000 (UTC) (envelope-from prvs=1032b0b9a9=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1211832140; x=1212436940; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=jGDRGflsVNGCOi0auRLAT hjRw1FjAoBDpg5E63+l668=; b=Bw8BxKNfIFMlOV7zuiskVZR4NMtOJdeTTdTtA 2CLCKBFI1JfOH3aPyvhHurqMj6k+Rgvz9ia1LGvCkeVB54Cs4/fmv1d+e7BXQI30 u4N/qY0Ien7D9M3faQDoMDilgXOdixZ8fac7oslcbJWF+QAmZwJDMJm37sIAS1EC OCByxU= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.5) with ESMTP id md50005670992.msg; Mon, 26 May 2008 21:02:17 +0100 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 212.135.219.182 X-Return-Path: prvs=1032b0b9a9=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <7EB9398C5B46415B96D2C20A2E261E13@multiplay.co.uk> From: "Steven Hartland" To: "Matthew Dillon" , "Kris Kennaway" References: <483B05DB.3000309@FreeBSD.org> <200805261936.m4QJaS7Q074045@apollo.backplane.com> Date: Mon, 26 May 2008 21:02:14 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Spam-Processed: mail1.multiplay.co.uk, Mon, 26 May 2008 21:02:19 +0100 X-MDAV-Processed: mail1.multiplay.co.uk, Mon, 26 May 2008 21:02:20 +0100 Cc: freebsd-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: Mon, 26 May 2008 20:19:33 -0000 ----- Original Message ----- From: "Matthew Dillon" >>> >>>[...] >>>confirmed :-) >>> >:> 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? > : > :Kris > > 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. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.