From owner-freebsd-arch@FreeBSD.ORG Sun Feb 29 09:22:36 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBDA916A4CE for ; Sun, 29 Feb 2004 09:22:36 -0800 (PST) Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 383E943D31 for ; Sun, 29 Feb 2004 09:22:36 -0800 (PST) (envelope-from Alexander@Leidinger.net) Received: from fwd08.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1AxUeA-0003TN-00; Sun, 29 Feb 2004 18:22:34 +0100 Received: from Andro-Beta.Leidinger.net (XdqOC4ZVYe3vyznm8MmxmSm3OZ85s43TP-9YXlsY-1VN5zQl3tvv65@[80.131.118.187]) by fmrl08.sul.t-online.com with esmtp id 1AxUdw-0uLeMq0; Sun, 29 Feb 2004 18:22:20 +0100 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) i1THM9OU096287; Sun, 29 Feb 2004 18:22:10 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (netchild@localhost [127.0.0.1]) i1THM9jP091922; Sun, 29 Feb 2004 18:22:09 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Sun, 29 Feb 2004 18:22:09 +0100 From: Alexander Leidinger To: arch@freebsd.org Message-Id: <20040229182209.7d1cdd12@Magellan.Leidinger.net> X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: XdqOC4ZVYe3vyznm8MmxmSm3OZ85s43TP-9YXlsY-1VN5zQl3tvv65@t-dialin.net cc: Garance A Drosihn cc: Marius Strobl Subject: updated Intel C compiler patch-set (kernel code and build infrastructure) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Feb 2004 17:22:36 -0000 Hi, I've updated the icc patch-set at http://www.leidinger.net/FreeBSD/current-patches/ relative to -current from Feb 26. icc.diff is the patch set icc.README is a short introduction how to use icc to compile the kernel icc.ChangeLog explains what I changed For those which missed the last bi-monthly status report: an icc compiled kernel (optimized for a P4) was used to try to build the entire ports collection: no dogs or cats where eaten by this patch, no black helicopters so far, no crashes... only some strange, white "something" which melts away when heated was fallen out of the sky, but I'm not sure if this may be a sideeffect of something different... As 5.2* is out the door, it may be a good time to get them into the tree. It would be nice if anyone of those src committers who showed interest in getting this support into the tree would step forward. Bye, Alexander. -- I will be available to get hired in April 2004. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-arch@FreeBSD.ORG Sun Feb 29 13:24:26 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2C8D16A4CE for ; Sun, 29 Feb 2004 13:24:26 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E84E43D1D for ; Sun, 29 Feb 2004 13:24:26 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i1TLOMkj028063; Sun, 29 Feb 2004 14:24:23 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 29 Feb 2004 14:24:27 -0700 (MST) Message-Id: <20040229.142427.22561661.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: arch@freebsd.org Subject: Re: 'sysctl dev', round two X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Feb 2004 21:24:26 -0000 In message: des@des.no (Dag-Erling Sm=F8rgrav) writes: : - unattached devices still aren't picked up, which they should if : they have a device_t. For instance, I don't see a sysctl entry fo= r : the following: : = : none0@pci0:31:3: class=3D0x0c0500 card=3D0x24c21458 chip=3D0x2= 4c38086 rev=3D0x02 hdr=3D0x00 : vendor =3D 'Intel Corporation' : device =3D '82801DB/DBM (ICH4/M) SMBus Controller' : class =3D serial bus : subclass =3D SMBus I'll see why. : - USB devices don't seem to report their location or pnpinfo. usb's uhub hasn't implemented these functions. Warner From owner-freebsd-arch@FreeBSD.ORG Sun Feb 29 13:27:07 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6CCA16A4CE for ; Sun, 29 Feb 2004 13:27:07 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4662A43D48 for ; Sun, 29 Feb 2004 13:27:07 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i1TLR4kj028099; Sun, 29 Feb 2004 14:27:04 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 29 Feb 2004 14:27:09 -0700 (MST) Message-Id: <20040229.142709.97076438.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: arch@freebsd.org Subject: Re: 'sysctl dev', round two X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Feb 2004 21:27:07 -0000 In message: des@des.no (Dag-Erling Sm=F8rgrav) writes: : - unattached devices still aren't picked up, which they should if : they have a device_t. For instance, I don't see a sysctl entry fo= r : the following: This is because you are basing things on attach, not a node being parented to the tree. I have some ideas on how to deal. Warner From owner-freebsd-arch@FreeBSD.ORG Sun Feb 29 14:45:31 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C6E316A4CE for ; Sun, 29 Feb 2004 14:45:31 -0800 (PST) Received: from pittgoth.com (14.zlnp1.xdsl.nauticom.net [209.195.149.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23D5843D1F for ; Sun, 29 Feb 2004 14:45:31 -0800 (PST) (envelope-from trhodes@FreeBSD.org) Received: from localhost ([192.168.0.5]) by pittgoth.com (8.12.10/8.12.10) with SMTP id i1TMjK4p009293; Sun, 29 Feb 2004 17:45:26 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Sun, 29 Feb 2004 17:45:37 -0500 From: Tom Rhodes To: Alexander Leidinger Message-Id: <20040229174537.17c22839@localhost> In-Reply-To: <20040229182209.7d1cdd12@Magellan.Leidinger.net> References: <20040229182209.7d1cdd12@Magellan.Leidinger.net> X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: arch@FreeBSD.org cc: Garance A Drosihn cc: Marius Strobl Subject: Re: updated Intel C compiler patch-set (kernel code and build infrastructure) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Feb 2004 22:45:31 -0000 On Sun, 29 Feb 2004 18:22:09 +0100 Alexander Leidinger wrote: > Hi, Hello Alexander! > > As 5.2* is out the door, it may be a good time to get them into the > tree. It would be nice if anyone of those src committers who showed > interest in getting this support into the tree would step forward. If no one on this list objects, universe builds, and someone lends me their anti-bikeshed/flameproof suit then I'll look into doing it -- Tom Rhodes From owner-freebsd-arch@FreeBSD.ORG Mon Mar 1 07:43:04 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35C8716A4CE for ; Mon, 1 Mar 2004 07:43:04 -0800 (PST) Received: from asterix.rsu.ru (asterix.rsu.ru [195.208.245.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 258F443D3F for ; Mon, 1 Mar 2004 07:43:03 -0800 (PST) (envelope-from bushman@stinger.cc.rsu.ru) Received: from [195.208.252.82] (stinger.cc.rsu.ru [195.208.252.82]) by asterix.rsu.ru (8.12.11/8.12.10) with ESMTP id i21FglL6040453; Mon, 1 Mar 2004 18:42:47 +0300 (MSK) (envelope-from bushman@stinger.cc.rsu.ru) Date: Mon, 1 Mar 2004 18:44:09 +0300 (MSK) From: Michael Bushkov To: arch@freebsd.org Message-ID: <20040301173836.K2509@stinger.cc.rsu.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on asterix.rsu.ru cc: bork@rsu.ru cc: and@rsu.ru cc: os@rsu.ru Subject: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 15:43:04 -0000 Hello! Some time ago there was a discussion concerning in-process vs. IPC nsswitch implementation. We agreed that we should develop an example of IPC implementation and ask for a discussion. We are glad to present you sample implementation of the IPC nsswitch model. http://rsu.ru/~bushman/lookupd-0.1.tar.gz It currently has many limitations but should be suitable for demonstration of our approach. There is a daemon and client part in this project. After executing make in "daemon" folder you'll get: 1) lookupd daemon - it should be run by root. And (!) you should be in the lookupd folder - daemon will search for it's modules in ./modules. 2) nsswrapper/nss_lookupd.so - a plug-in for current nsswitch implementation. It should be placed as nss_lookupd.so.1 in /usr/local/lib. lookupd.conf is the daemon configuration file. It has the same syntax as nsswitch.conf. It should be placed in /etc. Examples of lookupd.conf and nsswitch.conf (needed to use lookupd) are in the archive. Daemon uses shared modules (dns, files and so on). Currently following function can use lookupd: - passwd functions - files module - group function - files module - gethostby* functions - files and dns module. We took the code for dns modules from current libc. So it's not thread safe and can be buggy, because daemon is multi-threaded. It was made just to show module-structure capabilities. Later, we'll make normal reentrant resolver functions. When daemon is running, it sends a lot of info to stdout. It's the way to make you able to know, that it works. There is currently no caching functions in daemon. But it's quite easy to add them - and it will be done in the nearest future. We want you to look at this lookupd. It would be great for us to know if you like or not the way we made it. And we also want to know if this project can be added to FreeBSD project. Please keep CC line of the message, so that all of our developers could read your replies. Michael Bushkov Software Engineer, Rostov State University From owner-freebsd-arch@FreeBSD.ORG Mon Mar 1 10:58:08 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83F8E16A4CE for ; Mon, 1 Mar 2004 10:58:08 -0800 (PST) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECB7043D3F for ; Mon, 1 Mar 2004 10:58:07 -0800 (PST) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) i21Iw7a7063565; Mon, 1 Mar 2004 19:58:07 +0100 (CET) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.10/8.12.10/Submit) id i21Iw1c8063564; Mon, 1 Mar 2004 19:58:01 +0100 (CET) (envelope-from marius) Date: Mon, 1 Mar 2004 19:58:01 +0100 From: Marius Strobl To: Alexander Leidinger Message-ID: <20040301195801.Q38442@newtrinity.zeist.de> References: <20040229182209.7d1cdd12@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040229182209.7d1cdd12@Magellan.Leidinger.net>; from Alexander@Leidinger.net on Sun, Feb 29, 2004 at 06:22:09PM +0100 X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.24.0.5; VDF 6.24.0.29 (host: newtrinity.zeist.de) cc: arch@freebsd.org cc: Garance A Drosihn Subject: Re: updated Intel C compiler patch-set (kernel code and build infrastructure) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 18:58:08 -0000 On Sun, Feb 29, 2004 at 06:22:09PM +0100, Alexander Leidinger wrote: > Hi, > > I've updated the icc patch-set at > http://www.leidinger.net/FreeBSD/current-patches/ relative to -current > from Feb 26. > Like noted in a private mail to you earlier I wouldn't use both __ICC (which corresponds to "__INTEL_COMPILER && __i386__") and __INTEL_COMPILER in preprocessor directives but stick with __INTEL_COMPILER only. In all the places where the patch uses __ICC it's either implicitly clear that the code is i386-specific (because of the file location etc.) or isn't relevant (because ECC, which AFAIK is the sole other Intel Compiler also defining __INTEL_COMPILER, understands the same code etc.). I think in the long term using both, __ICC and __INTEL_COMPILER, will just cause confusion and the current scheme won't be adhered. From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 02:05:01 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49E7E16A4CE for ; Tue, 2 Mar 2004 02:05:01 -0800 (PST) Received: from jkh-gw.brierdr.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBC0343D1D for ; Tue, 2 Mar 2004 02:05:00 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [64.173.15.98] (IDENT:3330-ident-is-a-completely-pointless-protocol-that-offers-no-security-or-traceability-at-all-so-tak@adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by jkh-gw.brierdr.com (8.12.10/8.12.10) with ESMTP id i22A4OrF015944 for ; Tue, 2 Mar 2004 02:04:24 -0800 (PST) (envelope-from jkh@queasyweasel.com) Mime-Version: 1.0 (Apple Message framework v612) To: freebsd-arch@FreeBSD.ORG Message-Id: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-3--1017032267; protocol="application/pkcs7-signature" From: "Jordan K. Hubbard" Date: Tue, 2 Mar 2004 02:04:59 -0800 X-Mailer: Apple Mail (2.612) X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 10:05:01 -0000 --Apple-Mail-3--1017032267 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed I submit for your consideration the following test program and the wonderful variety of test results it produces: #include #include int main(int argc, char *argv[]) { int rc; FILE *fp=fopen("/dev/zero", "r"); rc = fputs("Hello world\n", fp); printf("errno = %d, rc = %d\n", errno, rc); errno = 0; rc = fwrite("Hello world again\n", 1, 18, fp); printf("fwrite errno = %d, rc = %d\n", errno, rc); fclose(fp); } On Red Hat Linux 9.0, it outputs the following: errno = 9, rc = -1 fwrite errno = 9, rc = 0 Just to save you the grepping, errno #9 is EBADF, "bad file number". Now we KNOW that the mode on that fopen is (a) on a device which doesn't allow writing and (b) of the wrong open mode ("r" rather than "w"), but this discussion concerns "the right thing to do" when faced with just these sorts of bogus situations and one could probably argue that Linux returns the wrong errno here, but it does set errno. What does FreeBSD do? It does this: errno = 0, rc = -1 fwrite errno = 0, rc = 0 Given that it's just not kosher to write on a read-only fp and get no error back at all, I would argue (though not passionately) for the following diff to libc: --- stdio/fvwrite.c 22 Mar 2002 21:53:04 -0000 1.15 +++ stdio/fvwrite.c 2 Mar 2004 08:40:25 -0000 @@ -43,6 +43,7 @@ #include #include #include +#include #include "local.h" #include "fvwrite.h" @@ -67,8 +68,10 @@ if ((len = uio->uio_resid) == 0) return (0); /* make sure we can write */ - if (cantwrite(fp)) + if (cantwrite(fp)) { + errno = EACCES; return (EOF); + } #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) That gives us this behavior for our little test program: errno = 13, rc = -1 fwrite errno = 13, rc = 0 In both cases, we get EACCES for fputs() or fwrite() attempts on a read-only file pointer pointing to a read-only device, something we'd expect to get "permission denied" for I think. In the case where we open the fp for write access, the FreeBSD behavior is unchanged: errno = 19, rc = 0 fwrite errno = 0, rc = 18 Which gives us ENODEV for the fputs(3) and no error for the fwrite(3). I'm not sure why an error is returned at all in the fputs(3) case since it seems perfectly valid to write onto /dev/null and simply have the data be discarded, but that error is coming back from somewhere deeper of the bowels of stdio and has nothing to do with my proposed diff in any case. Red Hat Linux, interestingly enough, returns errno 25 in this case (ENOTTY)! This is your libc. This is your libc on SUSv2*. Any questions? * References: http://www.opengroup.org/onlinepubs/007908799/xsh/fwrite.html http://www.opengroup.org/onlinepubs/007908799/xsh/fputs.html -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer --Apple-Mail-3--1017032267-- From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 02:37:54 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBEC516A4CE for ; Tue, 2 Mar 2004 02:37:54 -0800 (PST) Received: from srv01.sparkit.no (srv01.sparkit.no [193.69.116.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 328B143D39 for ; Tue, 2 Mar 2004 02:37:54 -0800 (PST) (envelope-from eivind@FreeBSD.org) Received: from ws ([193.69.114.88]) by srv01.sparkit.no (8.12.10/8.12.10) with ESMTP id i22AbmSD018175; Tue, 2 Mar 2004 11:37:48 +0100 (CET) (envelope-from eivind@FreeBSD.org) Received: from ws (localhost [127.0.0.1]) by ws (8.12.9/8.12.10) with ESMTP id i22Aajmd056475; Tue, 2 Mar 2004 10:36:45 GMT (envelope-from eivind@ws) Received: (from eivind@localhost) by ws (8.12.9/8.12.10/Submit) id i22AaiAw056466; Tue, 2 Mar 2004 10:36:45 GMT (envelope-from eivind) Date: Tue, 2 Mar 2004 10:35:43 +0000 From: Eivind Eklund To: "Jordan K. Hubbard" Message-ID: <20040302103543.GF27008@FreeBSD.org> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> User-Agent: Mutt/1.5.4i cc: freebsd-arch@FreeBSD.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 10:37:54 -0000 On Tue, Mar 02, 2004 at 02:04:59AM -0800, Jordan K. Hubbard wrote: > Given that it's just not kosher to write on a read-only fp and get no > error back at all, I would argue (though not passionately) for the > following diff to libc: > > --- stdio/fvwrite.c 22 Mar 2002 21:53:04 -0000 1.15 > +++ stdio/fvwrite.c 2 Mar 2004 08:40:25 -0000 > @@ -43,6 +43,7 @@ > #include > #include > #include > +#include > #include "local.h" > #include "fvwrite.h" > > @@ -67,8 +68,10 @@ > if ((len = uio->uio_resid) == 0) > return (0); > /* make sure we can write */ > - if (cantwrite(fp)) > + if (cantwrite(fp)) { > + errno = EACCES; > return (EOF); > + } > > #define MIN(a, b) ((a) < (b) ? (a) : (b)) > #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, > (size_t)(n)) > > That gives us this behavior for our little test program: > > errno = 13, rc = -1 > fwrite errno = 13, rc = 0 > > In both cases, we get EACCES for fputs() or fwrite() attempts on a > read-only file pointer pointing to a read-only device, something we'd > expect to get "permission denied" for I think. In the case where we > open the fp for write access, the FreeBSD behavior is unchanged: Based on a quick reading of the SUSv2 putc manpage[*] (which is what documents the errors for fwrite and fputs), I'd say the following error seems appropriate: [EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing. If we open the file for writing, I think we should get: [ENXIO] A request was made of a non-existent device, or the request was outside the capabilities of the device. EACCES is not allowed at all from these calls. Eivind. [*] The fputc manpage is at: http://www.opengroup.org/onlinepubs/007908799/xsh/fputc.html From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 03:10:27 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AF9C16A4CE for ; Tue, 2 Mar 2004 03:10:27 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B73EC43D1D for ; Tue, 2 Mar 2004 03:10:26 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.11/8.12.11) with ESMTP id i22BAP1Z000496; Tue, 2 Mar 2004 14:10:25 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.11/8.12.11/Submit) id i22BAP9i000495; Tue, 2 Mar 2004 14:10:25 +0300 (MSK) (envelope-from ache) Date: Tue, 2 Mar 2004 14:10:25 +0300 From: Andrey Chernov To: "Jordan K. Hubbard" Message-ID: <20040302111025.GA99496@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , "Jordan K. Hubbard" , freebsd-arch@FreeBSD.ORG References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.24.0.5; VDF 6.24.0.32 (host: pobrecita.freebsd.ru) cc: freebsd-arch@FreeBSD.ORG Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 11:10:27 -0000 On Tue, Mar 02, 2004 at 02:04:59AM -0800, Jordan K. Hubbard wrote: > errno =3D 9, rc =3D -1 > fwrite errno =3D 9, rc =3D 0 >=20 > Just to save you the grepping, errno #9 is EBADF, "bad file number". =20 They are right. According to POSIX for fwrite(), fputs(), fputc(): [EBADF] The file descriptor underlying stream is not a valid file=20 descriptor open for writing. > In both cases, we get EACCES for fputs() or fwrite() attempts on a=20 There is no EACCES in POSIX for this functions. Please don't reinvent the= =20 wheel. The next almost matching candidate for this functions is only: [ENXIO] A request was made of a nonexistent device, or the request was=20 outside the capabilities of the device. --=20 Andrey Chernov | http://ache.pp.ru/ From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 04:04:00 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1069616A4CE for ; Tue, 2 Mar 2004 04:04:00 -0800 (PST) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4820A43D2D for ; Tue, 2 Mar 2004 04:03:59 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i22C3vUe031482; Tue, 2 Mar 2004 23:03:57 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i22C3ssJ008711; Tue, 2 Mar 2004 23:03:55 +1100 Date: Tue, 2 Mar 2004 23:03:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: "Jordan K. Hubbard" In-Reply-To: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> Message-ID: <20040302213412.X1223@gamplex.bde.org> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-arch@freebsd.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 12:04:00 -0000 On Tue, 2 Mar 2004, Jordan K. Hubbard wrote: > I submit for your consideration the following test program and the > wonderful variety of test results it produces: freebsd-standards is a better list for C and POSIX conformance. > #include > #include > > int main(int argc, char *argv[]) > { > int rc; > > FILE *fp=fopen("/dev/zero", "r"); > rc = fputs("Hello world\n", fp); > printf("errno = %d, rc = %d\n", errno, rc); > errno = 0; > rc = fwrite("Hello world again\n", 1, 18, fp); > printf("fwrite errno = %d, rc = %d\n", errno, rc); > fclose(fp); > } > > On Red Hat Linux 9.0, it outputs the following: > > errno = 9, rc = -1 > fwrite errno = 9, rc = 0 > > Just to save you the grepping, errno #9 is EBADF, "bad file number". > Now we KNOW that the mode on that fopen is (a) on a device which > doesn't allow writing and (b) of the wrong open mode ("r" rather than > "w"), but this discussion concerns "the right thing to do" when faced > with just these sorts of bogus situations and one could probably argue > that Linux returns the wrong errno here, but it does set errno. > > What does FreeBSD do? It does this: > > errno = 0, rc = -1 Setting errno is a POSIX extension. It is not required in C9[09]. FreeBSD apparently only implements the C requirement here. FreeBSD's man page doesn't claim to set errno for fputs() (it "may" set it, and probably does set it if it calls write(2), but the library is too smart here and doesn't call write(2)). > fwrite errno = 0, rc = 0 Similarly, except the FreeBSD man page is imprecise to the point of brokenness. It says that errno is set if a write error occurred, but this only happens if there was a write(2) and the library is too smart here, so errno is whatever garbage was already in it. fwrite() has interesting behaviour for short but non-null writes. POSIX.1-1990 and POSIX.1-1996 spell out that such writes shall set the error indicator on the stream but shall not change errno. This corresponds to write(2) not setting errno for short writes. stdio would have to try to write the residual bytes after a short write and write() might then return -1 and set errno, and the standard is saying that fwrite() shall not set errno in this case. POSIX.1-2001 seems to be missing this requirement. The old standards say this in a poorly worded section which I first read as saying that this happens for all failing fwrite()s. > Given that it's just not kosher to write on a read-only fp and get no > error back at all, I would argue (though not passionately) for the > following diff to libc: The error is in the return code where it belongs (getting back fewer elements than requested for fwrite() means an error). Portable programs wouldn't test errno. However, POSIX requires setting errno. > > --- stdio/fvwrite.c 22 Mar 2002 21:53:04 -0000 1.15 > +++ stdio/fvwrite.c 2 Mar 2004 08:40:25 -0000 > @@ -43,6 +43,7 @@ > #include > #include > #include > +#include > #include "local.h" > #include "fvwrite.h" > > @@ -67,8 +68,10 @@ > if ((len = uio->uio_resid) == 0) > return (0); > /* make sure we can write */ > - if (cantwrite(fp)) > + if (cantwrite(fp)) { > + errno = EACCES; Should be EBADF, as in Linux. > return (EOF); > + } Otherwise, I agree with this change except for its style bugs (unsorting of the #includes and tab lossage). > That gives us this behavior for our little test program: > > errno = 13, rc = -1 > fwrite errno = 13, rc = 0 > > In both cases, we get EACCES for fputs() or fwrite() attempts on a > read-only file pointer pointing to a read-only device, something we'd > expect to get "permission denied" for I think. No, EBADF is correct since it is what write(2) would return if it were attempted. This is a POSIX requirement on write(2) (EBADF means "not a valid file descriptor open for writing" here, and there seems to be no way to distinguish "not open" and "not open for writing"; EACCES means "the write was on a socket and the calling process doesn't have appropriate privilege"). POSIX also generally requires stdio errno's to be the same as for the underliying functions (write() here). > In the case where we > open the fp for write access, the FreeBSD behavior is unchanged: > > errno = 19, rc = 0 > fwrite errno = 0, rc = 18 > > Which gives us ENODEV for the fputs(3) and no error for the fwrite(3). > I'm not sure why an error is returned at all in the fputs(3) case since > it seems perfectly valid to write onto /dev/null and simply have the > data be discarded, but that error is coming back from somewhere deeper > of the bowels of stdio and has nothing to do with my proposed diff in > any case. Red Hat Linux, interestingly enough, returns errno 25 in > this case (ENOTTY)! errno is garbage after most C library calls (ones that aren't specified to set it). I think it is guaranteed to be unchanged by many stdio calls in POSIX (fputs() and fwrite() but not fopen()). Thus it has the same near-garbage value that it had before the calls. ENOTTY is a common garbage value. It is left by isatty() in stdio initialization for a stream in many implementations. ktracing shows that errno 19 is another FreeBSD bug. It is returned by ioctl(...TIOCGETA...) on /dev/zero, presumably as part of isatty() (which is called by fputs()). ENODEV means that the device doesn't support any ioctls, but that is bogus since it supports some. The error should be ENOTTY as in Linux to indicate that the device doesn't support the specific ioctl. ENODEV is also not documented in the ioctl man page. Bruce From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 11:50:53 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FA5916A4CE for ; Tue, 2 Mar 2004 11:50:53 -0800 (PST) Received: from jkh-gw.brierdr.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7D1443D2D for ; Tue, 2 Mar 2004 11:50:52 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [64.173.15.98] (IDENT:3729-ident-is-a-completely-pointless-protocol-that-offers-no-security-or-traceability-at-all-so-tak@adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by jkh-gw.brierdr.com (8.12.10/8.12.10) with ESMTP id i22JoErF018277; Tue, 2 Mar 2004 11:50:14 -0800 (PST) (envelope-from jkh@queasyweasel.com) In-Reply-To: <20040302213412.X1223@gamplex.bde.org> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> <20040302213412.X1223@gamplex.bde.org> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-4--981882491; protocol="application/pkcs7-signature" Message-Id: From: "Jordan K. Hubbard" Date: Tue, 2 Mar 2004 11:50:48 -0800 To: Bruce Evans X-Mailer: Apple Mail (2.612) X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-arch@freebsd.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 19:50:53 -0000 --Apple-Mail-4--981882491 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Thanks to everyone (not just bde) for reviewing the fix. Linux was right, I was wrong, EBADF it is! On Mar 2, 2004, at 4:03 AM, Bruce Evans wrote: > Should be EBADF, as in Linux. > >> return (EOF); >> + } > > Otherwise, I agree with this change except for its style bugs > (unsorting > of the #includes and tab lossage). Change committed with #includes sorted and proper use of tabs (change is consistent with the rest of the file's style). It's also not clear to me why ENODEV is being returned, though I'm not as inclined to blame isatty() since it appears to do the right thing: #include #include #include main() { int fd, ret; fd = open("/dev/null", O_RDONLY); ret = isatty(fd); printf("ret = %d, errno = %d\n", ret, errno); close(fd); } Prints: ret = 0, errno = 25 All isatty() does is call tcgetattr(), it doesn't do an ioctl(...TIOCGETA...). -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer --Apple-Mail-4--981882491-- From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 13:57:01 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D6A916A4CE for ; Tue, 2 Mar 2004 13:57:01 -0800 (PST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 9534543D45 for ; Tue, 2 Mar 2004 13:56:59 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 88482 invoked by uid 1001); 2 Mar 2004 21:56:57 -0000 Date: Tue, 2 Mar 2004 22:56:57 +0100 From: Erik Trulsson To: "Jordan K. Hubbard" Message-ID: <20040302215657.GA88174@falcon.midgard.homeip.net> Mail-Followup-To: "Jordan K. Hubbard" , Bruce Evans , freebsd-arch@freebsd.org References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> <20040302213412.X1223@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-arch@freebsd.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 21:57:01 -0000 On Tue, Mar 02, 2004 at 11:50:48AM -0800, Jordan K. Hubbard wrote: > Thanks to everyone (not just bde) for reviewing the fix. Linux was > right, I was wrong, EBADF it is! > > On Mar 2, 2004, at 4:03 AM, Bruce Evans wrote: > > >Should be EBADF, as in Linux. > > > >> return (EOF); > >>+ } > > > >Otherwise, I agree with this change except for its style bugs > >(unsorting > >of the #includes and tab lossage). > > Change committed with #includes sorted and proper use of tabs (change > is consistent with the rest of the file's style). > > It's also not clear to me why ENODEV is being returned, though I'm not > as inclined to blame isatty() since it appears to do the right thing: > > #include > #include > #include > > main() { > int fd, ret; > > fd = open("/dev/null", O_RDONLY); > ret = isatty(fd); > printf("ret = %d, errno = %d\n", ret, errno); > close(fd); > } > > Prints: ret = 0, errno = 25 > > All isatty() does is call tcgetattr(), it doesn't do an > ioctl(...TIOCGETA...). But tcgetattr does call ioctl(..TIOCGETA...). In particular isatty is implemented as [...] retval = (tcgetattr(fd, &t) != -1); [...] return retval; [...] so if isatty returns 0, then tcgetattr returned -1. If tcgetattr returns -1 it means some error occured and errno is set to indicate the type of error. errno==25 is ENOTTY which is exactly what tcgetattr(3) is documented to return if the file descriptor does not refer to a terminal (which it does not do in this example.) In short: The code above seems to behave absolutely correctly and as one would expect. Unless a function actually returns an error, (and the documentation says it sets errno) errno should be assumed to contain garbage. >From the intro(2) manpage: When a system call detects an error, it returns an integer value indicating failure (usually -1) and sets the variable errno accordingly. Successful calls never set errno; once set, it remains until another error occurs. It should only be examined after an error. Note that a number of system calls overload the meanings of these error numbers, and that the meanings must be interpreted according to the type and circumstances of the call. -- Erik Trulsson ertr1013@student.uu.se From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 20:21:40 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38CA516A4CE for ; Tue, 2 Mar 2004 20:21:40 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55EA243D31 for ; Tue, 2 Mar 2004 20:21:39 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i234LZnX029007; Wed, 3 Mar 2004 15:21:35 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i234LVsJ018459; Wed, 3 Mar 2004 15:21:33 +1100 Date: Wed, 3 Mar 2004 15:21:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: "Jordan K. Hubbard" In-Reply-To: Message-ID: <20040303150647.Y5253@gamplex.bde.org> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-arch@freebsd.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 04:21:40 -0000 On Tue, 2 Mar 2004, Jordan K. Hubbard wrote: > It's also not clear to me why ENODEV is being returned, though I'm not > as inclined to blame isatty() since it appears to do the right thing: > > #include > #include > #include > > main() { > int fd, ret; > > fd = open("/dev/null", O_RDONLY); > ret = isatty(fd); > printf("ret = %d, errno = %d\n", ret, errno); > close(fd); > } > > Prints: ret = 0, errno = 25 This is because someone fixed /dev/null but not /dev/zero (I misread this in my previous reply). They are implemented in the same file, but only 1 has this bug. From null.c: %%% static struct cdevsw null_cdevsw = { .d_version = D_VERSION, .d_read = (d_read_t *)nullop, .d_write = null_write, .d_ioctl = null_ioctl, .d_name = "null", .d_maj = CDEV_MAJOR, }; static struct cdevsw zero_cdevsw = { .d_version = D_VERSION, .d_read = zero_read, .d_write = null_write, .d_name = "zero", .d_maj = CDEV_MAJOR, .d_flags = D_MMAP_ANON, }; %%% /dev/null has a special ioctl function "null_ioctl" which does the right thing without having to do anything (the existence of an ioctl function means that at least 1 ioctl is supported, so ENOTTY is correct for the unsupported ones). /dev/zero doesn't have any ioctl function, so it gets the default which is enodev() (which just returns ENODEV). This is almost correct -- ENODEV means that ioctls are completely unsupported, which is technically correct. However, it is surprising -- ENOTTY is the errno for most types of files including regular ones. > All isatty() does is call tcgetattr(), it doesn't do an > ioctl(...TIOCGETA...). Yes it does; see another reply. (tcgetattr() is tcsetattr(3), not a hypothetical tcsetattr(2) syscall. It happens to be implemented using an old ioctl.) Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Mar 4 14:40:06 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4105A16A4CE; Thu, 4 Mar 2004 14:40:06 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8792B43D1D; Thu, 4 Mar 2004 14:40:05 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 72FD7ACDD0; Thu, 4 Mar 2004 23:40:03 +0100 (CET) Date: Thu, 4 Mar 2004 23:40:03 +0100 From: Pawel Jakub Dawidek To: arch@freebsd.org Message-ID: <20040304224003.GG10864@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sDKAb4OeUBrWWL6P" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: mtm@freebsd.org Subject: rcNG cleanups... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 22:40:06 -0000 --sDKAb4OeUBrWWL6P Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. While choosing scripts that are not usable inside jail, I've found few things that should be solved. 1. There are many scripts from NetBSD that are not instaled. Because we are not longer want to stay in sync with NetBSD's rcNG, we should remove them, as I susspect. 2. /etc/rc.d/routed script: if checkyesno gated && checkyesno routed; then warn "gated and routed both requested to be run: only running gated." return 1 fi We don't have gated, so this should be probably removed. I'm going to commit 'nojail' flag for scripts that I know are usless inside jail, there are still some scripts that I can't decide about this. Bigger change is for hostname script. Here it is: --- hostname 30 Jul 2003 18:53:59 -0000 1.3 +++ hostname 4 Mar 2004 22:38:33 -0000 @@ -39,12 +39,20 @@ stop_cmd=3D":" =20 hostname_start() { - # Set the host name if it is not already set + # If we are not inside jail, set the host name if it is not already set. + # If we are inside jail set host name even if it is already set, + # but first check if it permitted. # - if [ -z "`hostname -s`" ]; then - hostname ${hostname} - echo "Setting hostname: `hostname`." + if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then + if [ `$SYSCTL_N security.jail.set_hostname_allowed` -eq 0 ]; then + return + fi + elif [ -n "`hostname -s`" ]; then + return fi + + hostname ${hostname} + echo "Setting hostname: `hostname`." } =20 load_rc_config $name --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --sDKAb4OeUBrWWL6P Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAR7BDForvXbEpPzQRAv6XAJ9W3Vgtn4+TqPulo1ckKWOL1DmMgACgmX5J GqzT4PSLV3bZcXc45XgREHw= =fPDi -----END PGP SIGNATURE----- --sDKAb4OeUBrWWL6P-- From owner-freebsd-arch@FreeBSD.ORG Thu Mar 4 16:33:46 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EC2E16A4CE; Thu, 4 Mar 2004 16:33:46 -0800 (PST) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0A8E43D2D; Thu, 4 Mar 2004 16:33:45 -0800 (PST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from dibbler.crodrigues.org (h00609772adf0.ne.client2.attbi.com[66.31.45.197]) by comcast.net (rwcrmhc11) with ESMTP id <2004030500334301300jntcoe>; Fri, 5 Mar 2004 00:33:43 +0000 Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) i250XmAG098713; Thu, 4 Mar 2004 19:33:48 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.crodrigues.org (8.12.11/8.12.10/Submit) id i250Xmb9098712; Thu, 4 Mar 2004 19:33:48 -0500 (EST) (envelope-from rodrigc) Date: Thu, 4 Mar 2004 19:33:47 -0500 From: Craig Rodrigues To: freebsd-arch@freebsd.org Message-ID: <20040305003347.GA98548@crodrigues.org> References: <20040129000559.GA54451@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040129000559.GA54451@crodrigues.org> User-Agent: Mutt/1.4.1i cc: jeff@freebsd.org Subject: Re: ULE testing with "late" tool? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 00:33:46 -0000 On Wed, Jan 28, 2004 at 07:05:59PM -0500, Craig Rodrigues wrote: > Hi, > > I was reading the following paper about ULE: > > http://www.chesapeake.net/~jroberson/ULE.pdf > > This paper mentions a tool called "late" for > measuring performance of a scheduler. > Anyone know where I can obtain this tool? Hi, I brought this up on this mailing list before with no response. Can someone tell me where to find the "late" tool for measuring scheduling performance which is mentioned in Jeff Roberson's ULE.pdf paper? Thanks. -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Thu Mar 4 17:04:37 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F54816A4CF; Thu, 4 Mar 2004 17:04:37 -0800 (PST) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id C887D43D3F; Thu, 4 Mar 2004 17:04:36 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) i2514Sfu026487; Thu, 4 Mar 2004 17:04:28 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost)i2514SR5026486; Thu, 4 Mar 2004 17:04:28 -0800 (PST) (envelope-from sgk) Date: Thu, 4 Mar 2004 17:04:27 -0800 From: Steve Kargl To: Craig Rodrigues Message-ID: <20040305010427.GA26030@troutmask.apl.washington.edu> References: <20040129000559.GA54451@crodrigues.org> <20040305003347.GA98548@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040305003347.GA98548@crodrigues.org> User-Agent: Mutt/1.4.1i cc: jeff@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: ULE testing with "late" tool? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 01:04:37 -0000 On Thu, Mar 04, 2004 at 07:33:47PM -0500, Craig Rodrigues wrote: > On Wed, Jan 28, 2004 at 07:05:59PM -0500, Craig Rodrigues wrote: > > Hi, > > > > I was reading the following paper about ULE: > > > > http://www.chesapeake.net/~jroberson/ULE.pdf > > > > This paper mentions a tool called "late" for > > measuring performance of a scheduler. > > Anyone know where I can obtain this tool? > > I brought this up on this mailing list before > with no response. Can someone tell me where > to find the "late" tool for measuring scheduling performance > which is mentioned in Jeff Roberson's ULE.pdf paper? > > Thanks. > Anybody try http://www.chesapeake.net/~jroberson/? -- Steve From owner-freebsd-arch@FreeBSD.ORG Thu Mar 4 17:09:04 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED73916A4CE for ; Thu, 4 Mar 2004 17:09:04 -0800 (PST) Received: from gidgate.gid.co.uk (gid.co.uk [194.32.164.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4169A43D2D for ; Thu, 4 Mar 2004 17:09:04 -0800 (PST) (envelope-from rb@gid.co.uk) Received: (from rb@localhost) by gidgate.gid.co.uk (8.11.7/8.11.6) id i2518kn07142; Fri, 5 Mar 2004 01:08:46 GMT (envelope-from rb) Message-Id: <6.0.3.0.2.20040305010434.03677bc0@gid.co.uk> X-Sender: rbmail@gid.co.uk (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.3.0 Date: Fri, 05 Mar 2004 01:08:44 +0000 To: Craig Rodrigues From: Bob Bishop In-Reply-To: <20040305003347.GA98548@crodrigues.org> References: <20040129000559.GA54451@crodrigues.org> <20040305003347.GA98548@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: freebsd-arch@freebsd.org Subject: Re: ULE testing with "late" tool? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 01:09:05 -0000 Hi, At 00:33 05/03/2004, Craig Rodrigues wrote: >On Wed, Jan 28, 2004 at 07:05:59PM -0500, Craig Rodrigues wrote: > > Hi, > > > > I was reading the following paper about ULE: > > > > http://www.chesapeake.net/~jroberson/ULE.pdf > > > > This paper mentions a tool called "late" for > > measuring performance of a scheduler. > > Anyone know where I can obtain this tool? > >Hi, > >I brought this up on this mailing list before >with no response. Can someone tell me where >to find the "late" tool for measuring scheduling performance >which is mentioned in Jeff Roberson's ULE.pdf paper? Um, have a look in http://www.chesapeake.net/~jroberson/, http://www.chesapeake.net/~jroberson/late.tgz looks promising. -- Bob Bishop +44 (0)118 977 4017 rb@gid.co.uk fax +44 (0)118 989 4254 From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 00:04:51 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DA7216A4CE; Fri, 5 Mar 2004 00:04:51 -0800 (PST) Received: from telecom.net.et (ns2.telecom.net.et [213.55.64.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DB0B43D1F; Fri, 5 Mar 2004 00:04:44 -0800 (PST) (envelope-from mtm@identd.net) Received: from [213.55.66.129] (HELO pool-151-200-10-97.res.east.verizon.net) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP-TLS id 38421838; Fri, 05 Mar 2004 10:47:57 +0300 Received: from mobile.acs-et.com (localhost [127.0.0.1]) ESMTP id i257rCQ1006941; Fri, 5 Mar 2004 10:53:19 +0300 (EAT) (envelope-from mtm@mobile.acs-et.com) Received: (from mtm@localhost) by mobile.acs-et.com (8.12.11/8.12.11/Submit) id i257r1nU006939; Fri, 5 Mar 2004 10:53:01 +0300 (EAT) (envelope-from mtm) Date: Fri, 5 Mar 2004 10:52:39 +0300 From: Mike Makonnen To: Pawel Jakub Dawidek Message-ID: <20040305075239.GB5149@mobile.acs-et.com> References: <20040304224003.GG10864@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040304224003.GG10864@darkness.comp.waw.pl> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD/5.2-CURRENT (i386) cc: arch@FreeBSD.org cc: mtm@FreeBSD.org Subject: Re: rcNG cleanups... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 08:04:51 -0000 On Thu, Mar 04, 2004 at 11:40:03PM +0100, Pawel Jakub Dawidek wrote: > Hi. > > While choosing scripts that are not usable inside jail, I've found few > things that should be solved. > > 1. There are many scripts from NetBSD that are not instaled. > Because we are not longer want to stay in sync with NetBSD's rcNG, > we should remove them, as I susspect. No, these should stay. They are good for reference purposes, and they may come in handy in the future. Also, the space they take up is minimal. > > 2. /etc/rc.d/routed script: > > if checkyesno gated && checkyesno routed; then > warn "gated and routed both requested to be run: only running gated." > return 1 > fi > > We don't have gated, so this should be probably removed. Yes, good catch. > > Bigger change is for hostname script. > Here it is: > Looks good to me. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 00:43:53 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D52F516A4CE; Fri, 5 Mar 2004 00:43:53 -0800 (PST) Received: from asterix.rsu.ru (asterix.rsu.ru [195.208.245.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1BF443D48; Fri, 5 Mar 2004 00:43:52 -0800 (PST) (envelope-from bushman@stinger.cc.rsu.ru) Received: from [195.208.252.82] (stinger.cc.rsu.ru [195.208.252.82]) by asterix.rsu.ru (8.12.11/8.12.10) with ESMTP id i258he8O048648; Fri, 5 Mar 2004 11:43:40 +0300 (MSK) (envelope-from bushman@stinger.cc.rsu.ru) Date: Fri, 5 Mar 2004 11:45:24 +0300 (MSK) From: Michael Bushkov To: hackers@freebsd.org, arch@freebsd.org Message-ID: <20040305114316.K19883@stinger.cc.rsu.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on asterix.rsu.ru cc: bork@rsu.ru cc: and@rsu.ru cc: os@rsu.ru Subject: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 08:43:54 -0000 Hello! Some time ago there was a discussion concerning in-process vs. IPC nsswitch implementation. We agreed that we should develop an example of IPC implementation and ask for a discussion. We are glad to present you sample implementation of the IPC nsswitch model. http://rsu.ru/~bushman/lookupd-0.1.1.tar.gz It currently has many limitations but should be suitable for demonstration of our approach. There is a daemon and client part in this project. After executing make in "daemon" folder you'll get: 1) lookupd daemon - it should be run by root. And (!) you should be in the lookupd folder - daemon will search for it's modules in ./modules. 2) nsswrapper/nss_lookupd.so - a plug-in for current nsswitch implementation. It should be placed as nss_lookupd.so.1 in /usr/local/lib. lookupd.conf is the daemon configuration file. It has the same syntax as nsswitch.conf. It should be placed in /etc. Examples of lookupd.conf and nsswitch.conf (needed to use lookupd) are in the archive. Daemon uses shared modules (dns, files and so on). Currently following function can use lookupd: - passwd functions - files module - group function - files module - gethostby* functions - files and dns module. We took the code for dns modules from current libc. So it's not thread safe and can be buggy, because daemon is multi-threaded. It was made just to show module-structure capabilities. Later, we'll make normal reentrant resolver. When daemon is running, it sends a lot of info to stdout. It's the way to make you able to know, that it works. There is currently no caching functions in daemon. But it's quite easy to add them - and it will be done in the nearest future. We want you to look at this lookupd. It would be great for us to know if you like or not the way we made it. And we also want to know if this project can be added to FreeBSD project. Please keep CC line of the message, so that all of our developers could read your replies. Michael Bushkov Software Engineer, Rostov State University From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 01:04:10 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 597AE16A4CE; Fri, 5 Mar 2004 01:04:10 -0800 (PST) Received: from 66.89.130.142.ptr.us.xo.net (66.89.130.142.ptr.us.xo.net [66.89.130.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE30443D46; Fri, 5 Mar 2004 01:04:09 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [192.168.1.112] ([192.168.1.112])i258ucb11065; Fri, 5 Mar 2004 00:56:39 -0800 In-Reply-To: <20040305114316.K19883@stinger.cc.rsu.ru> References: <20040305114316.K19883@stinger.cc.rsu.ru> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <196F4F94-6E84-11D8-A51F-0003930F2856@queasyweasel.com> Content-Transfer-Encoding: 7bit From: Jordan K Hubbard Date: Fri, 5 Mar 2004 01:04:24 -0800 To: Michael Bushkov X-Mailer: Apple Mail (2.612) cc: bork@rsu.ru cc: arch@freebsd.org cc: os@rsu.ru cc: hackers@freebsd.org cc: and@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 09:04:10 -0000 Sounds similar to, but not as functional as, the lookupd in Mac OS X. :) On Mar 5, 2004, at 12:45 AM, Michael Bushkov wrote: > We want you to look at this lookupd. It would be great for us to know > if > you like or not the way we made it. And we also want to know if this > project can be added to FreeBSD project. > -- Jordan Hubbard Engineering Manager, BSD Technology Group Apple Computer From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 06:45:24 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDEA116A4CE; Fri, 5 Mar 2004 06:45:24 -0800 (PST) Received: from asterix.rsu.ru (asterix.rsu.ru [195.208.245.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id D90C143D46; Fri, 5 Mar 2004 06:45:23 -0800 (PST) (envelope-from bushman@rsu.ru) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) by asterix.rsu.ru (8.12.11/8.12.10) with ESMTP id i25Ej6ba076098; Fri, 5 Mar 2004 17:45:06 +0300 (MSK) (envelope-from bushman@rsu.ru) Date: Fri, 5 Mar 2004 17:46:55 +0300 (MSK) From: Michael Bushkov X-X-Sender: bushman@stinger.cc.rsu.ru To: Jordan K Hubbard In-Reply-To: <196F4F94-6E84-11D8-A51F-0003930F2856@queasyweasel.com> Message-ID: <20040305174450.L40507@stinger.cc.rsu.ru> References: <20040305114316.K19883@stinger.cc.rsu.ru> <196F4F94-6E84-11D8-A51F-0003930F2856@queasyweasel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-104.9 required=5.0 tests=BAYES_00,USER_IN_WHITELIST autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on asterix.rsu.ru cc: and@rsu.ru cc: Michael Bushkov cc: arch@freebsd.org cc: hackers@freebsd.org cc: os@rsu.ru cc: bork@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 14:45:25 -0000 Hello! What do you mean exactly by saying "not as functional"? Michael Bushkov Software Engineer, Rostov State University On Fri, 5 Mar 2004, Jordan K Hubbard wrote: > Sounds similar to, but not as functional as, the lookupd in Mac OS X. :) > > On Mar 5, 2004, at 12:45 AM, Michael Bushkov wrote: > > > We want you to look at this lookupd. It would be great for us to know > > if > > you like or not the way we made it. And we also want to know if this > > project can be added to FreeBSD project. > > > -- > Jordan Hubbard > Engineering Manager, BSD Technology Group > Apple Computer > > From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 09:35:36 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D5F416A518; Fri, 5 Mar 2004 09:35:36 -0800 (PST) Received: from 66.89.130.142.ptr.us.xo.net (66.89.130.142.ptr.us.xo.net [66.89.130.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 079D543D2F; Fri, 5 Mar 2004 09:35:36 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [192.168.1.112] ([192.168.1.112])i25HS1b20035; Fri, 5 Mar 2004 09:28:01 -0800 In-Reply-To: <20040305174450.L40507@stinger.cc.rsu.ru> References: <20040305114316.K19883@stinger.cc.rsu.ru> <196F4F94-6E84-11D8-A51F-0003930F2856@queasyweasel.com> <20040305174450.L40507@stinger.cc.rsu.ru> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <86427D3D-6ECB-11D8-9274-0003930F2856@queasyweasel.com> Content-Transfer-Encoding: 7bit From: Jordan K Hubbard Date: Fri, 5 Mar 2004 09:35:41 -0800 To: Michael Bushkov X-Mailer: Apple Mail (2.612) cc: and@rsu.ru cc: Michael Bushkov cc: arch@freebsd.org cc: hackers@freebsd.org cc: os@rsu.ru cc: bork@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 17:35:36 -0000 The Mac OS X lookupd does aggressive caching with cache invalidation support, supports the notion of flushing the cache on certain events (like when you reconfigure your network interfaces or switch authentication plugins), and quite a few other things. No surprise, really, given that it's been around for years. Julian was asking where to find it, and for those who get lost navigating Apple's darwin site, there's also opendarwin's cvsweb interface. Darwin's "nsswitch" implementation lives in Libinfo, of which lookupd is a sub-project: http://cvs.opendarwin.org/index.cgi/src/Libinfo/ - Jordan On Mar 5, 2004, at 6:46 AM, Michael Bushkov wrote: > Hello! > What do you mean exactly by saying "not as functional"? > > Michael Bushkov > Software Engineer, > Rostov State University > > On Fri, 5 Mar 2004, Jordan K Hubbard wrote: > >> Sounds similar to, but not as functional as, the lookupd in Mac OS X. >> :) >> >> On Mar 5, 2004, at 12:45 AM, Michael Bushkov wrote: >> >>> We want you to look at this lookupd. It would be great for us to know >>> if >>> you like or not the way we made it. And we also want to know if this >>> project can be added to FreeBSD project. >>> >> -- >> Jordan Hubbard >> Engineering Manager, BSD Technology Group >> Apple Computer >> >> > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > -- Jordan Hubbard Engineering Manager, BSD Technology Group Apple Computer From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 10:22:56 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2962016A4CE; Fri, 5 Mar 2004 10:22:56 -0800 (PST) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B756D43D1D; Fri, 5 Mar 2004 10:22:55 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i25IMse0003540; Fri, 5 Mar 2004 13:22:54 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040305075239.GB5149@mobile.acs-et.com> References: <20040304224003.GG10864@darkness.comp.waw.pl> <20040305075239.GB5149@mobile.acs-et.com> Date: Fri, 5 Mar 2004 13:22:53 -0500 To: Mike Makonnen , Pawel Jakub Dawidek From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: arch@freebsd.org Subject: Re: rcNG cleanups... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 18:22:56 -0000 At 10:52 AM +0300 3/5/04, Mike Makonnen wrote: > > >> 1. There are many scripts from NetBSD that are not installed. > > Because we are not longer want to stay in sync with NetBSD's > > rcNG, we should remove them, as I susspect. > >No, these should stay. They are good for reference purposes, and >they may come in handy in the future. Also, the space they take >up is minimal. But it could be argued that they are only good for reference of what NetBSD would do for the matching service. They are not necessarily what would be right for FreeBSD. And in the future, when we want a reference for what NetBSD does for some service, we can always just look at whatever they're using at *that* time. Disclaimer: I have no particular preference on this, I'm just saying that a reasonable argument could be made.... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 10:47:10 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C34C816A4CE for ; Fri, 5 Mar 2004 10:47:10 -0800 (PST) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id A346843D39 for ; Fri, 5 Mar 2004 10:47:10 -0800 (PST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from dibbler.crodrigues.org (h00609772adf0.ne.client2.attbi.com[66.31.45.197]) by comcast.net (rwcrmhc13) with ESMTP id <2004030518470901500q432ve>; Fri, 5 Mar 2004 18:47:09 +0000 Received: from dibbler.crodrigues.org (localhost.crodrigues.org [127.0.0.1]) i25IlAKf003904; Fri, 5 Mar 2004 13:47:15 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.crodrigues.org (8.12.11/8.12.10/Submit) id i25Il9Ld003903; Fri, 5 Mar 2004 13:47:09 -0500 (EST) (envelope-from rodrigc) Date: Fri, 5 Mar 2004 13:47:09 -0500 From: Craig Rodrigues To: Bob Bishop Message-ID: <20040305184709.GA3892@crodrigues.org> References: <20040129000559.GA54451@crodrigues.org> <20040305003347.GA98548@crodrigues.org> <6.0.3.0.2.20040305010434.03677bc0@gid.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.0.3.0.2.20040305010434.03677bc0@gid.co.uk> User-Agent: Mutt/1.4.1i cc: freebsd-arch@freebsd.org Subject: Re: ULE testing with "late" tool? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 18:47:10 -0000 On Fri, Mar 05, 2004 at 01:08:44AM +0000, Bob Bishop wrote: > Um, have a look in http://www.chesapeake.net/~jroberson/, > http://www.chesapeake.net/~jroberson/late.tgz looks promising. Thanks, this looks like it. I was wondering, who is actively involved with measuring scheduler performance on FreeBSD? FreeBSD scheduler gurus may want to take a look at the Hourglass tool written by John Regehr at University of Utah: http://www.cs.utah.edu/~regehr/hourglass/ Hourglass has been used to measure scheduler performance on Linux, FreeBSD 4.x, and Windows 2000. Thanks. -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 11:41:45 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEB3416A4CE; Fri, 5 Mar 2004 11:41:45 -0800 (PST) Received: from smtp.aaanet.ru (smtp.aaanet.ru [80.80.111.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9DCE43D5D; Fri, 5 Mar 2004 11:41:44 -0800 (PST) (envelope-from bushman@rsu.ru) Received: from [80.80.119.212] (helo=localhost.localdomain) by smtp.aaanet.ru with esmtp (Exim 4.30; FreeBSD) id 1AzLIX-0002ej-TP; Fri, 05 Mar 2004 22:47:56 +0300 Date: Fri, 05 Mar 2004 22:41:33 +0300 To: Jordan K Hubbard From: Michael Bushkov Organization: Rostov State University Message-ID: User-Agent: Opera7.23/FreeBSD M2 build 518 Content-Type: text/plain; format=flowed; charset=windows-1251 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit cc: bork@rsu.ru cc: and@rsu.ru cc: hackers@freebsd.org cc: os@rsu.ru cc: arch@freebsd.org Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 19:41:46 -0000 > The Mac OS X lookupd does aggressive caching with cache invalidation > support, supports the notion of flushing the cache on certain events > (like when you reconfigure your network interfaces or switch > authentication plugins), and quite a few other things. No surprise, > really, given that it's been around for years. > > Julian was asking where to find it, and for those who get lost > navigating Apple's darwin site, there's also opendarwin's cvsweb > interface. Darwin's "nsswitch" implementation lives in Libinfo, of > which lookupd is a sub-project: > > http://cvs.opendarwin.org/index.cgi/src/Libinfo/ > > - Jordan The problem of using Darwin's lookupd was discussed some time ago in the freebsd-arch mailing list. It seems to me that the way to port Darwin's lookupd on FreeBSD was not found, was it? Our implementation of lookupd is a demonstration of the approach for the FreeBSD-specific IPC implementation of nsswitch. Its architecture is flexible enough to implement all the features you have mentioned. The version that we have sent isn't a finished project. It's in the development stage and caching is currently our main task. We hope to make caching in the nearest future. We'll try to release stable and quite full version (i mean caching, LDAP module and so on) as soon as we can. Our questions are: 1) What do you think about our whole approach to the IPC implementation development? 2) Is there an opportunity to use our implementation of lookupd in the FreeBSD project? We'll be glad to hear your opinion. Michael Bushkov, Software Engineer, Rostov State University From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 13:02:33 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB90D16A4CE for ; Fri, 5 Mar 2004 13:02:33 -0800 (PST) Received: from spiff.melthusia.org (spiff.melthusia.org [207.67.244.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97C1443D41 for ; Fri, 5 Mar 2004 13:02:33 -0800 (PST) (envelope-from gtetlow@spiff.melthusia.org) Received: from spiff.melthusia.org (gtetlow@localhost [127.0.0.1]) by spiff.melthusia.org (8.12.10/8.12.10) with ESMTP id i25KxgV9035536; Fri, 5 Mar 2004 12:59:42 -0800 (PST) (envelope-from gtetlow@spiff.melthusia.org) Received: (from gtetlow@localhost) by spiff.melthusia.org (8.12.10/8.12.10/Submit) id i25Kxf51035535; Fri, 5 Mar 2004 12:59:41 -0800 (PST) (envelope-from gtetlow) Date: Fri, 5 Mar 2004 12:59:41 -0800 From: Gordon Tetlow To: Michael Bushkov Message-ID: <20040305205941.GV660@spiff.melthusia.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HxQt9wRz9wbL5Edg" Content-Disposition: inline In-Reply-To: X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . User-Agent: Mutt/1.5.5.1i cc: and@rsu.ru cc: Jordan K Hubbard cc: arch@freebsd.org cc: hackers@freebsd.org cc: os@rsu.ru cc: bork@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 21:02:33 -0000 --HxQt9wRz9wbL5Edg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 05, 2004 at 10:41:33PM +0300, Michael Bushkov wrote: >=20 > Our implementation of lookupd is a demonstration > of the approach for the FreeBSD-specific IPC implementation > of nsswitch. Its architecture is > flexible enough to implement all the features you have mentioned. > The version that we have sent isn't a finished project. It's in the > development stage and caching is currently our main task. We hope to make > caching in the nearest future. > We'll try to release stable and quite full version (i mean caching, LDAP > module and so on) as soon as we can. >=20 > Our questions are: > 1) What do you think about our whole approach to the IPC implementation > development? > 2) Is there an opportunity to use our implementation of lookupd in the > FreeBSD project? The thing that I'm most interested in is getting support for the existing NSS modules out there (nss_ldap being my personal interest). Is there a way with the IPC based model to make the existing in-process modules (I'm thinking nss_winbind and nss_ldap) work with the IPC daemon? If not, I doubt you'll get a whole lot of support for the IPC model because it will cause us to incur a maintence cost to make these other very useful modules work. -gordon --HxQt9wRz9wbL5Edg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQFASOo9Ru2t9DV9ZfsRAvl/AKC7sSIBvaGiUZHaQAYY+PSluSJSugCbBge9 My6NefctgyqtkC2vLagWXlY= =Mf24 -----END PGP SIGNATURE----- --HxQt9wRz9wbL5Edg-- From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 13:28:35 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD42B16A4CE; Fri, 5 Mar 2004 13:28:35 -0800 (PST) Received: from smtp.aaanet.ru (smtp.aaanet.ru [80.80.111.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE1B743D39; Fri, 5 Mar 2004 13:28:34 -0800 (PST) (envelope-from bushman@rsu.ru) Received: from [80.80.101.35] (helo=localhost.localdomain) by smtp.aaanet.ru with esmtp (Exim 4.30; FreeBSD) id 1AzMxl-0003cM-JT; Sat, 06 Mar 2004 00:34:50 +0300 To: Gordon Tetlow From: Michael Bushkov Organization: Rostov State University Content-Type: text/plain; format=flowed; charset=windows-1251 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Sat, 06 Mar 2004 00:27:58 +0300 Message-ID: User-Agent: Opera7.23/FreeBSD M2 build 518 cc: and@rsu.ru cc: Jordan K Hubbard cc: arch@freebsd.org cc: hackers@freebsd.org cc: os@rsu.ru cc: bork@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 21:28:35 -0000 I understand this. There are some problems in making current nss-modules compatible with our implementation. The main problem is process euid. When you're using current nss-modules they work as part of your program - and geteuid functions work correctly. But when lookupd is used, euid of the process is lookupds' euid. And that's a problem. There are two possible solutions, i think: 1) We can run 2 daemons. One with root euid. And one with "simple user" euid. Client side will choose one or another to connect. But this way is rather expensive. 2) We can try to change geteuid function in modules for our function, which will return thread-specific value, which would be set by daemon. The minus is that we, however, will need to recompile nss-modules. And another thing. When we use lookupd daemon we can optimize it work much. For example, modules can use persistent-connections. It can be very useful. But, returning to your question :) It is possible, i think. There are some disadvantages, but it's possible. Of course, using modules, developed for lookupd would be better, but as "compatibility" decision we can try to implement usage of current nss-modules. Michael Bushkov, Software Engineer, Rostov State University On Fri, 5 Mar 2004, Gordon Tetlow wrote: > On Fri, Mar 05, 2004 at 10:41:33PM +0300, Michael Bushkov wrote: > > > > Our implementation of lookupd is a demonstration > > of the approach for the FreeBSD-specific IPC implementation > > of nsswitch. Its architecture is > > flexible enough to implement all the features you have mentioned. > > The version that we have sent isn't a finished project. It's in the > > development stage and caching is currently our main task. We hope to > make > > caching in the nearest future. > > We'll try to release stable and quite full version (i mean caching, > LDAP > > module and so on) as soon as we can. > > > > Our questions are: > > 1) What do you think about our whole approach to the IPC implementation > > development? > > 2) Is there an opportunity to use our implementation of lookupd in the > > FreeBSD project? > > The thing that I'm most interested in is getting support for the existing > NSS modules out there (nss_ldap being my personal interest). Is there a > way with the IPC based model to make the existing in-process modules > (I'm thinking nss_winbind and nss_ldap) work with the IPC daemon? If not, > I doubt you'll get a whole lot of support for the IPC model because it > will cause us to incur a maintence cost to make these other very useful > modules work. From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 16:38:01 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DC5D16A4CE; Fri, 5 Mar 2004 16:38:01 -0800 (PST) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 225F443D2D; Fri, 5 Mar 2004 16:38:01 -0800 (PST) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id B05FE5485D; Fri, 5 Mar 2004 18:38:00 -0600 (CST) Received: by madman.celabo.org (Postfix, from userid 1001) id 3B2676D465; Fri, 5 Mar 2004 18:38:00 -0600 (CST) Date: Fri, 5 Mar 2004 18:38:00 -0600 From: "Jacques A. Vidrine" To: Michael Bushkov Message-ID: <20040306003800.GA80556@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Michael Bushkov , Jordan K Hubbard , bork@rsu.ru, and@rsu.ru, os@rsu.ru, arch@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.6i cc: bork@rsu.ru cc: os@rsu.ru cc: Jordan K Hubbard cc: and@rsu.ru cc: arch@freebsd.org Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 00:38:01 -0000 [We need to pick a list and stop cross-posting. I pick `arch@freebsd.org'.] On Fri, Mar 05, 2004 at 10:41:33PM +0300, Michael Bushkov wrote: > The problem of using Darwin's lookupd was discussed some time ago in the > freebsd-arch mailing list. It seems to me that the way to port Darwin's > lookupd on FreeBSD was not found, was it? Jordan's message was the first I recall mentioning lookupd. I took a quick peek, seems neat. I'd like to take some more time to examine the APIs it presents. I also intend to look at what you have. > Our implementation of lookupd is a demonstration > of the approach for the FreeBSD-specific IPC implementation > of nsswitch. Its architecture is > flexible enough to implement all the features you have mentioned. > The version that we have sent isn't a finished project. It's in the > development stage and caching is currently our main task. We hope to make > caching in the nearest future. > We'll try to release stable and quite full version (i mean caching, LDAP > module and so on) as soon as we can. You're not going to have to write your own modules (like LDAP), are you? That seems like a big drawback. > Our questions are: > 1) What do you think about our whole approach to the IPC implementation > development? > 2) Is there an opportunity to use our implementation of lookupd in the > FreeBSD project? > > We'll be glad to hear your opinion. I'll certainly look at what you have and send comments to this list, but I'm afraid it won't be immediate. You may also want to ping NetBSD guys. Cheers, -- Jacques Vidrine / nectar@celabo.org / jvidrine@verio.net / nectar@freebsd.org From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 16:40:36 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BE1916A4D1 for ; Fri, 5 Mar 2004 16:40:36 -0800 (PST) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B64843D1D for ; Fri, 5 Mar 2004 16:40:36 -0800 (PST) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id CC62C54846; Fri, 5 Mar 2004 18:40:35 -0600 (CST) Received: by madman.celabo.org (Postfix, from userid 1001) id 5EA616D465; Fri, 5 Mar 2004 18:40:35 -0600 (CST) Date: Fri, 5 Mar 2004 18:40:35 -0600 From: "Jacques A. Vidrine" To: Michael Bushkov Message-ID: <20040306004035.GB80556@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Michael Bushkov , arch@freebsd.org, bork@rsu.ru, and@rsu.ru, os@rsu.ru References: <20040301173836.K2509@stinger.cc.rsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040301173836.K2509@stinger.cc.rsu.ru> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.6i cc: bork@rsu.ru cc: arch@freebsd.org cc: os@rsu.ru cc: and@rsu.ru Subject: Re: IPC nsswitch implementation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 00:40:36 -0000 On Mon, Mar 01, 2004 at 06:44:09PM +0300, Michael Bushkov wrote: > There is a daemon and client part in this project. After executing make > in "daemon" folder you'll get: > 1) lookupd daemon - it should be run by root. And (!) you should be in the > lookupd folder - daemon will search for it's modules in ./modules. > 2) nsswrapper/nss_lookupd.so - a plug-in for current nsswitch > implementation. It should be placed as nss_lookupd.so.1 in /usr/local/lib. Cool, I think this is a great approach for prototyping nsswitch features. Cheers, -- Jacques Vidrine / nectar@celabo.org / jvidrine@verio.net / nectar@freebsd.org From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 17:12:34 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3A2316A4CE for ; Fri, 5 Mar 2004 17:12:33 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id D43C943D1F for ; Fri, 5 Mar 2004 17:12:33 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i261CSRH030557 for ; Fri, 5 Mar 2004 17:12:28 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i261CSGm030556 for arch@freebsd.org; Fri, 5 Mar 2004 17:12:28 -0800 Date: Fri, 5 Mar 2004 17:12:28 -0800 From: Brooks Davis To: arch@freebsd.org Message-ID: <20040306011228.GC24617@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Izn7cH1Com+I3R9J" Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Subject: rc.d/diskless overhaul X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 01:12:34 -0000 --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please find attached, a patch to overhaul rc.d/diskless (the script formerly know as rc.diskless2.) =20 These changes break the functions of diskless up into three new scripts, resolv, tmp, and var, plus a modification to hostname. To enable scenerios other than NFS roots, these scripts no longer check that they are operating in that mode and instead rely of an combination of rc.conf variables and automated probes to determine what actions they will take. I am running these changes on my test cluster with good results. Comments on the operation of the scripts or on how they are written are requested. Developers can find these changes in perforce under //depot/user/brooks/cleanup/... Documenation will follow after functionality is determined. -- Brooks Changed files: etc/rc.subr etc/defaults/rc.conf etc/rc.d/Makefile etc/rc.d/cleanvar etc/rc.d/cleartmp etc/rc.d/hostname etc/rc.d/initdiskless Added files: etc/rc.d/resolv etc/rc.d/tmp etc/rc.d/var Removed files (remove these by hand): etc/rc.d/diskless *** diffs for diskless changes *** --- ../freebsd/etc/rc.subr Thu Mar 4 14:05:49 2004 +++ etc/rc.subr Fri Mar 5 16:06:12 2004 @@ -1273,3 +1273,16 @@ fi return 0 } + +# Provide a function for normalizing the mounting of memory +# filesystems. This should allow the rest of the code here to remain +# as close as possible between 5-current and 4-stable. +# $1 =3D size +# $2 =3D mount point +# $3 =3D (optional) bytes-per-inode +mount_md() { + if [ -n "$3" ]; then + bpi=3D"-i $3" + fi + /sbin/mdmfs $bpi -s $1 -M md $2 +} --- ../freebsd/etc/defaults/rc.conf Thu Mar 4 14:05:49 2004 +++ etc/defaults/rc.conf Fri Mar 5 16:06:11 2004 @@ -38,6 +38,11 @@ pccard_conf=3D"/etc/defaults/pccard.conf" # pccardd(8) config file pccard_ether_delay=3D"5" # Delay before trying to start dhclient in pccard= _ether removable_interfaces=3D"" # Removable network interfaces for /etc/pccard_e= ther. +tmpmfs=3D"AUTO" # Set to YES to always create an mfs /tmp, NO to never +tmpsize=3D"20m" # Size of mfs /tmp if created +varmfs=3D"AUTO" # Set to YES to always create an mfs /var, NO to never +varsize=3D"32m" # Size of mfs /var if created +populate_var=3D"AUTO" # Set to YES to always (re)populate /var, NO to never local_startup=3D"/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script= dirs. script_name_sep=3D" " # Change if your startup scripts' names contain spac= es rc_conf_files=3D"/etc/rc.conf /etc/rc.conf.local" --- ../freebsd/etc/rc.d/Makefile Fri Mar 5 10:59:01 2004 +++ etc/rc.d/Makefile Fri Mar 5 16:27:40 2004 @@ -6,7 +6,7 @@ apm apmd archdep atm1 atm2 atm3 \ bgfsck bootparams \ ccd cleanvar cleartmp cron \ - devd devfs dhclient diskless \ + devd devfs dhclient \ dmesg dumpon \ early.sh \ fsck \ @@ -27,14 +27,14 @@ othermta \ pccard pcvt power_profile ppp-user pppoed pwcheck \ quota \ - random rarpd rcconf.sh root \ + random rarpd rcconf.sh resolv root \ route6d routed routing rpcbind rtadvd rwho \ savecore securelevel sendmail \ serial sppp sshd swap1 \ syscons sysctl syslogd \ - timed \ + timed tmp \ usbd \ - vinum virecover \ + var vinum virecover \ watchdogd \ ypbind yppasswdd ypserv \ ypset ypupdated ypxfrd --- ../freebsd/etc/rc.d/cleanvar Tue Sep 30 22:50:50 2003 +++ etc/rc.d/cleanvar Fri Mar 5 16:06:11 2004 @@ -4,7 +4,7 @@ # =20 # PROVIDE: cleanvar -# REQUIRE: mountcritlocal +# REQUIRE: mountcritlocal var # KEYWORD: FreeBSD =20 purgedir() --- ../freebsd/etc/rc.d/cleartmp Fri Mar 5 10:59:01 2004 +++ etc/rc.d/cleartmp Fri Mar 5 16:27:40 2004 @@ -5,7 +5,7 @@ # =20 # PROVIDE: cleartmp -# REQUIRE: mountcritremote +# REQUIRE: mountall tmp # BEFORE: DAEMON # KEYWORD: FreeBSD =20 --- ../freebsd/etc/rc.d/hostname Fri Mar 5 10:59:01 2004 +++ etc/rc.d/hostname Fri Mar 5 16:27:40 2004 @@ -49,6 +49,14 @@ fi elif [ -n "`hostname -s`" ]; then return + else + # If we're not in a jail and rc.conf doesn't specify a + # hostname, see if we can get one from kenv. + # + if [ -z "${hostname}" -a \ + "x`/bin/kenv dhcp.host-name`" !=3D "x" ]; then + hostname=3D`/bin/kenv dhcp.host-name` + fi fi =20 hostname ${hostname} --- ../freebsd/etc/rc.d/initdiskless Mon Oct 13 15:25:52 2003 +++ etc/rc.d/initdiskless Fri Mar 5 15:28:18 2004 @@ -75,8 +75,8 @@ # /conf/default/etc/{rc.conf,rc.local,fstab}. Your fstab should be sure # to mount a /usr... typically an NFS readonly /usr. # -# NOTE! /etc/rc.d/diskless will create /var, /tmp, and /dev. -# Those filesystems should not be specified in /conf. At least not yet. +# NOTE! /var, /tmp, and /dev will be created elsewhere. +# Those filesystems should not be specified in /conf. =20 dlv=3D`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` [ ${dlv:=3D0} -eq 0 ] && exit 0 @@ -158,6 +158,17 @@ fi shift done + +# If /conf/diskless_remount exists, remount all of /conf. This allows +# multiple roots to share the same conf files. +if [ -d /conf -a -f /conf/diskless_remount ]; then + nfspt=3D`/bin/cat /conf/diskless_remount` + if [ `expr "$nfspt" : '\(.\)'` =3D "/" ]; then + nfspt=3D"${nfsroot}${nfspt}" + fi + mount_nfs $nfspt /conf + chkerr $? "mount_nfs $nfspt /conf" +fi =20 # Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca}, # and /conf/${bootp_ipa}. For each subdirectory found within these --- /dev/null Fri Mar 5 16:33:00 2004 +++ etc/rc.d/resolv Fri Mar 5 16:06:11 2004 @@ -0,0 +1,56 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO= SE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI= AL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI= CT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: src/etc/rc.d/diskless,v 1.30 2004/01/05 19:14:47 brooks Exp $ +# + +# PROVIDE: resolv +# REQUIRE: initdiskless rcconf +# KEYWORD: FreeBSD + +. /etc/rc.subr + +name=3D"resolv" + +load_rc_config $name + +# if the info is available via dhcp/kenv +# build the resolv.conf +# +if [ ! -e /etc/resolv.conf -a \ + "x`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" !=3D "x" ]; then + /bin/cat /dev/null > /etc/resolv.conf + + if [ "x`/bin/kenv dhcp.domain-name 2> /dev/null`" !=3D "x" ]; then + echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf + fi + + set `/bin/kenv dhcp.domain-name-servers` + for ns in `IFS=3D','; echo $*`; do + echo nameserver $ns >> /etc/resolv.conf; + done +fi + --- /dev/null Fri Mar 5 16:33:00 2004 +++ etc/rc.d/tmp Fri Mar 5 16:06:11 2004 @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO= SE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI= AL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI= CT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: src/etc/rc.d/diskless,v 1.30 2004/01/05 19:14:47 brooks Exp $ +# + +# PROVIDE: tmp +# REQUIRE: mountcritlocal +# KEYWORD: FreeBSD + +. /etc/rc.subr + +name=3D"tmp" + +load_rc_config $name + +# If we do not have a writable /tmp, create a memory +# filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, +# then it should already be writable). +# +case "${tmpmfs}" in +[Yy][Ee][Ss]) + mount_md ${tmpsize} /tmp + chmod 01777 /tmp + ;; +[Nn][Oo]) + ;; +*) + if (/bin/mkdir /tmp/.diskless 2> /dev/null); then + rmdir /tmp/.diskless + else + if [ -h /tmp ]; then + echo "*** /tmp is a symlink to a non-writable area!" + echo "dropping into shell, ^D to continue anyway." + /bin/sh + else + mount_md ${tmpsize} /tmp + chmod 01777 /tmp + fi + fi + ;; +esac --- /dev/null Fri Mar 5 16:33:00 2004 +++ etc/rc.d/var Fri Mar 5 16:06:12 2004 @@ -0,0 +1,97 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO= SE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI= AL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI= CT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: src/etc/rc.d/diskless,v 1.30 2004/01/05 19:14:47 brooks Exp $ +# + +# PROVIDE: var +# REQUIRE: mountcritlocal +# KEYWORD: FreeBSD + +. /etc/rc.subr + +name=3D"var" + +load_rc_config $name + +_populate_var() +{ + /usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null + case ${sendmail_enable} in + [Nn][Oo][Nn][Ee]) + ;; + *) + /usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null + ;; + esac + + /usr/sbin/newsyslog -CC + + /usr/bin/touch /var/log/lastlog + + # XXX: should create spool dirs for lpd +} + +# If we do not have a writable /var, create a memory filesystem for /var +# unless told otherwise by rc.conf. We don't have /usr yet so use mkdir +# instead of touch to test. We want mount to record its mounts so we +# have to make sure /var/db exists before doing the mount -a. +# +case "${varmfs}" in +[Yy][Ee][Ss]) + mount_md ${varsize} /var + ;; +[Nn][Oo]) + ;; +*) + if (/bin/mkdir /var/.diskless 2> /dev/null); then + rmdir /var/.diskless + else + mount_md ${varsize} /var + fi +esac + + +# If we have an empty looking /var, populate it, but only if we have +# /usr available. Hopefully, we'll eventually find a workaround, but +# in realistic diskless setups, we're probably ok. +case "${populate_var}" in +[Yy][Ee][Ss]) + _populate_var + ;; +[Nn][Oo]) + ;; +*) + if [ -d /var/run -a -d /var/db -a -d /var/empty ] ; then + true + elif [ ! -x /usr/sbin/mtree -o ! -x /usr/sbin/newsyslog -o \ + ! -x /usr/bin/touch ] ; then + false + else + _populate_var + fi + ;; +esac --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --Izn7cH1Com+I3R9J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFASSV6XY6L6fI4GtQRAqTvAKCH2qpweaP+REr4HXgMDUs0Q9SVKwCg40o/ a7jUrsLwyoFur6ROchi6GV8= =BYET -----END PGP SIGNATURE----- --Izn7cH1Com+I3R9J-- From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 17:30:39 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63CAA16A4CE for ; Fri, 5 Mar 2004 17:30:39 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 081C843D2D for ; Fri, 5 Mar 2004 17:30:38 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id E0DF0ACDD0; Sat, 6 Mar 2004 02:30:35 +0100 (CET) Date: Sat, 6 Mar 2004 02:30:35 +0100 From: Pawel Jakub Dawidek To: Brooks Davis Message-ID: <20040306013035.GO10864@darkness.comp.waw.pl> References: <20040306011228.GC24617@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+wSiqF7c0ySQ2tNi" Content-Disposition: inline In-Reply-To: <20040306011228.GC24617@Odin.AC.HMC.Edu> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: arch@freebsd.org Subject: Re: rc.d/diskless overhaul X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 01:30:39 -0000 --+wSiqF7c0ySQ2tNi Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 05, 2004 at 05:12:28PM -0800, Brooks Davis wrote: [...] Looks ok, I think. One little question: +> --- ../freebsd/etc/rc.d/cleartmp Fri Mar 5 10:59:01 2004 +> +++ etc/rc.d/cleartmp Fri Mar 5 16:27:40 2004 +> @@ -5,7 +5,7 @@ +> # +> =20 +> # PROVIDE: cleartmp +> -# REQUIRE: mountcritremote +> +# REQUIRE: mountall tmp mountall? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --+wSiqF7c0ySQ2tNi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFASSm7ForvXbEpPzQRAqGzAKCkt+2KqlVhJIWiW/xvMJnffrOMQgCeOjoR jr+qEAcI8M3cZQMwcbaLp3k= =Vd8c -----END PGP SIGNATURE----- --+wSiqF7c0ySQ2tNi-- From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 17:41:48 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFFAC16A4CE; Fri, 5 Mar 2004 17:41:48 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7CA543D2F; Fri, 5 Mar 2004 17:41:48 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i261fcRH003204; Fri, 5 Mar 2004 17:41:38 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i261fcwX003197; Fri, 5 Mar 2004 17:41:38 -0800 Date: Fri, 5 Mar 2004 17:41:38 -0800 From: Brooks Davis To: Pawel Jakub Dawidek Message-ID: <20040306014138.GA2428@Odin.AC.HMC.Edu> References: <20040306011228.GC24617@Odin.AC.HMC.Edu> <20040306013035.GO10864@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <20040306013035.GO10864@darkness.comp.waw.pl> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: arch@FreeBSD.org Subject: Re: rc.d/diskless overhaul X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 01:41:48 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 06, 2004 at 02:30:35AM +0100, Pawel Jakub Dawidek wrote: > On Fri, Mar 05, 2004 at 05:12:28PM -0800, Brooks Davis wrote: > [...] >=20 > Looks ok, I think. >=20 > One little question: >=20 > +> --- ../freebsd/etc/rc.d/cleartmp Fri Mar 5 10:59:01 2004 > +> +++ etc/rc.d/cleartmp Fri Mar 5 16:27:40 2004 > +> @@ -5,7 +5,7 @@ > +> # > +> =20 > +> # PROVIDE: cleartmp > +> -# REQUIRE: mountcritremote > +> +# REQUIRE: mountall tmp >=20 > mountall? That's what was there at some point in the past. Now that I grep for it, I see that it's required by five scripts, but provided by none. Those scripts are: accounting amd cleartmp ldconfig mountd I think I choose mountall because it seemed to imply being last and there aren't any scripts that need /tmp explictily. By waiting as long as possiable, I hoped to improve our chances of someone else coming along with a /tmp. Thanks, Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFASSxQXY6L6fI4GtQRAvCdAKCVaMTPYOe/vpKH77bNVs8AwrkqBACcCLe7 neiI79yM5EJHanW9TZ7mFVQ= =PuVq -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6-- From owner-freebsd-arch@FreeBSD.ORG Fri Mar 5 17:51:38 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA90016A4CE; Fri, 5 Mar 2004 17:51:38 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90FCD43D1D; Fri, 5 Mar 2004 17:51:38 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i261pZRH005091; Fri, 5 Mar 2004 17:51:35 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i261pZFg005085; Fri, 5 Mar 2004 17:51:35 -0800 Date: Fri, 5 Mar 2004 17:51:35 -0800 From: Brooks Davis To: Brooks Davis Message-ID: <20040306015130.GC2428@Odin.AC.HMC.Edu> References: <20040306011228.GC24617@Odin.AC.HMC.Edu> <20040306013035.GO10864@darkness.comp.waw.pl> <20040306014138.GA2428@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/Uq4LBwYP4y1W6pO" Content-Disposition: inline In-Reply-To: <20040306014138.GA2428@Odin.AC.HMC.Edu> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: arch@FreeBSD.org cc: Pawel Jakub Dawidek Subject: Re: rc.d/diskless overhaul X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 01:51:38 -0000 --/Uq4LBwYP4y1W6pO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 05, 2004 at 05:41:38PM -0800, Brooks Davis wrote: > On Sat, Mar 06, 2004 at 02:30:35AM +0100, Pawel Jakub Dawidek wrote: > > On Fri, Mar 05, 2004 at 05:12:28PM -0800, Brooks Davis wrote: > > [...] > >=20 > > Looks ok, I think. > >=20 > > One little question: > >=20 > > +> --- ../freebsd/etc/rc.d/cleartmp Fri Mar 5 10:59:01 2004 > > +> +++ etc/rc.d/cleartmp Fri Mar 5 16:27:40 2004 > > +> @@ -5,7 +5,7 @@ > > +> # > > +> =20 > > +> # PROVIDE: cleartmp > > +> -# REQUIRE: mountcritremote > > +> +# REQUIRE: mountall tmp > >=20 > > mountall? >=20 > That's what was there at some point in the past. Now that I grep for > it, I see that it's required by five scripts, but provided by none. > Those scripts are: >=20 > accounting > amd > cleartmp > ldconfig > mountd >=20 > I think I choose mountall because it seemed to imply being last and > there aren't any scripts that need /tmp explictily. By waiting as long > as possiable, I hoped to improve our chances of someone else coming > along with a /tmp. Oops, it looks like that machine it out of date. Only non-installed scripts now contain mountall requirements. I'll switch to just requiring tmp. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --/Uq4LBwYP4y1W6pO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFASS4WXY6L6fI4GtQRAuuQAJ4sbjw87mDKGSg21aLTit/yda26BgCg4KcF RE3m5JWOKmm+CWsEk64M2qM= =vy/N -----END PGP SIGNATURE----- --/Uq4LBwYP4y1W6pO--