From owner-freebsd-arch@FreeBSD.ORG Fri Jun 6 16:44:57 2003 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 6D1BB37B401; Fri, 6 Jun 2003 16:44:57 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E344843F75; Fri, 6 Jun 2003 16:44:56 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h56NiuVI028256; Fri, 6 Jun 2003 16:44:56 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h56NiuNb028255; Fri, 6 Jun 2003 16:44:56 -0700 (PDT) Date: Fri, 6 Jun 2003 16:44:56 -0700 (PDT) From: Matthew Dillon Message-Id: <200306062344.h56NiuNb028255@apollo.backplane.com> To: Robert Watson References: cc: freebsd-arch@freebsd.org Subject: Re: Making a dynamically-linked root 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, 06 Jun 2003 23:44:57 -0000 It would be fairly easy to create a unix-domain or localhost socketed port service and messaging primitives to access just about any configuration data that you would typically store in a file. Initially such a service would simply access the appropriate file and relay the information to the client but ultimately it could incorporate more sophisticated features on its backend without any modifications having to be done on the client side or to the client protocol. Something like this: * client connects to sevice * client sends message with creds (SCM_CREDS) containing request. The message would include a serial id to allow the client side to multi-thread or stream requests, configuration file id or path name, command, and data. * client gets reply (and optionally caches result, default to off). (done) Frontend primitives could be as simple as 'get record N', and 'lookup record with key', plus a timeout/failure and possibly a failsafe feature. The entire implementation in libc would be very small and record data would always be returned in text form (key/data) for maximum portability. Backend sophisitication could include loadable modules to integrate remote services for particular configuration file classes, like NIS, multiple resolver sources, logging/auditing, security restrictions, different backend storage mechanisms such as databases, backend forking and/or multi-threading to handle parallel blockable requests (e.g. DNS lookups), automatic DBM management (no need to run pwd_mkdb and friends), security partitioning (fork/jail) to prevent bugs from corrupting other users using the service, and so forth. It would be nice to be able to get rid of the necessity of running all the *_mkdb commands and to remove PAM, locale, and the resolver from client binaries, and to have a mechanism that anyone can write a simple DLL to support their own special circumstances. -Matt Matthew Dillon :I think that would be quite neat; as discussed, irs from the BIND :distribution does the DNS elements of this, although not in our current :framework. An idea I've also been interested in looking at, now that we :have NSS to indirect many of the database operations, is how easy it would :be to indirect new configuration data through NSS. For example, although :we can share account information via directory services such as NIS, LDAP, :etc, we cannot currently share login.conf user class data. Some other :configuration files might also lend themselves quite well to this sort of :configuration -- perhaps even files such as inetd.conf, ftpusers, :login.access, opiekies, etc. : :One of the important goals of elements like NSS is to improve our ability :to centrally manage many FreeBSD systems in a scalable manner; another is :the ability to support more reliable and more easily managed backends, :such as configuration databases originating in local SQL, etc. :Experimenting with ways to take this a few steps further might be quite :interesting, and could have some nice payoffs. : :Robert N M Watson FreeBSD Core Team, TrustedBSD Projects :robert@fledge.watson.org Network Associates Laboratories