From owner-freebsd-hackers Sun Jan 18 14:29:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA20197 for hackers-outgoing; Sun, 18 Jan 1998 14:29:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gvr.gvr.org (root@gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA20178 for ; Sun, 18 Jan 1998 14:28:34 -0800 (PST) (envelope-from guido@gvr.org) Received: (from guido@localhost) by gvr.gvr.org (8.8.6/8.8.5) id XAA24830; Sun, 18 Jan 1998 23:28:13 +0100 (MET) From: Guido van Rooij Message-Id: <199801182228.XAA24830@gvr.gvr.org> Subject: Re: socket ops In-Reply-To: <199801182224.PAA04738@usr04.primenet.com> from Terry Lambert at "Jan 18, 98 10:24:13 pm" To: tlambert@primenet.com (Terry Lambert) Date: Sun, 18 Jan 1998 23:28:12 +0100 (MET) Cc: FreeBSD-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Terry Lambert wrote: > > I just found out that I cannot fchmod unix domain sockets. > > > > This is because fchmod() calls getvnode() which fails if the vnode > > passed is not of type vnode or type fifo. > > Is there a reason for this rationale? > > Look for "struct fileops" in /sys/kern/*.c, and all will be revealed. > > The mode is referenced via VOP_GETATTR/VOP_SETATTR off of a vnode > to get the FS specific method of getting/setting mode bits. If you > do not have a backing object, you do not have mode bits. ?? There *is* a backing object. I am talking about UNIX domain sockets here. -Guido