From owner-freebsd-hackers Tue May 8 22:11:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id B5BA137B422 for ; Tue, 8 May 2001 22:11:32 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 282DD3E2B; Tue, 8 May 2001 22:11:32 -0700 (PDT) To: tlambert2@mindspring.com Cc: hackers@FreeBSD.ORG Subject: Re: Getting peer credentials on a unix domain socket In-Reply-To: <3AF80870.39A8705B@mindspring.com>; from tlambert2@mindspring.com on "Tue, 08 May 2001 07:53:36 -0700" Date: Tue, 08 May 2001 22:11:31 -0700 From: Dima Dorfman Message-Id: <20010509051132.282DD3E2B@bazooka.unixfreak.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert writes: > I think adding a new system call is _not_ the way to go; there > are perfectly good fcntl() commands, which fail to work under > FreeBSD, but work just fine under Solaris, SunOS, Linux, and > most other UNIX systems (we are back to "struct fileops" being > major suckage here). Are you objecting to specifically making this a system call, or implementing it in general? I.e., is a socket option acceptable? Basically, this thread is about trying to find a mechanism that can be used to meet these two conditions on unix domain sockets: 1. Server can obtain the credentials of the connect() caller. 2. The above can be done without depending on the connect() caller to send any data through the socket. Condition 1 is easy to meet; SCM_CREDS already exists. On the other hand, nobody has found an existing way to meet condition 2. If you can change this (i.e., describe a way to do this for the list), great. Otherwise, I have a patch[1] that implements this as a socket option, and William Baxter has a patch to implement it as a system call. Dima Dorfman dima@unixfreak.org [1] http://www.unixfreak.org/~dima/home/peercred.diff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message