From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 27 14:13:29 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A680D16A41F; Sat, 27 Aug 2005 14:13:29 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4F0643D45; Sat, 27 Aug 2005 14:13:28 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) by mail.r61.net (8.13.4/8.13.4) with ESMTP id j7REDI4b069540; Sat, 27 Aug 2005 18:13:19 +0400 (MSD) (envelope-from bushman@rsu.ru) Date: Sat, 27 Aug 2005 18:17:04 +0400 (MSD) From: Michael Bushkov X-X-Sender: bushman@stinger.cc.rsu.ru To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20050827170633.Y5409@stinger.cc.rsu.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on asterix.r61.net X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on asterix.r61.net Cc: Jacques Vidrine , Brooks Davis Subject: [PATCH] caching daemon release and nsswitch patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 14:13:29 -0000 Hi! I'm working on nsswitch improvement (during the Google Summer of Code program. And, as the deadline is close, I'd like to make some kind of release. Actually there would be 2 releases, this is the first. This release includes 3 patches. They could be found in the Perforce repository: http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=//depot/projects/soc2005/nsswitch%5fcached/patches/include.diff&REV=1 http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=//depot/projects/soc2005/nsswitch%5fcached/patches/libc.diff&REV=1 http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=//depot/projects/soc2005/nsswitch%5fcached/patches/usr.sbin.diff&REV=1 or on my mirror: http://www.rsu.ru/~bushman/cached/downloads/patchset1/include.diff http://www.rsu.ru/~bushman/cached/downloads/patchset1/libc.diff http://www.rsu.ru/~bushman/cached/downloads/patchset1/usr.sbin.diff Some words on how to use and what it gives: include.diff and libc.diff should be applied like that: from usr/src: patch -p0 < include.diff, from usr/src/lib: patch -p0 < libc.diff Features, which would be added by these patches: - services-related functions (getserv*) will use nsswitch - rpc-related functions (getrpc*) will use nsswitch - protocols-related functions (getproto*) will use nsswitch - "services", "rpc" and "protocols" sources would be available in nsswitch.conf file One of my major tasks was to add caching ability to the nsswitch. So, these patches also would do it for the following nsswitch sources: - passwd - group - services - rpc - protocols To make caching work, you'll require the caching daemon. It is in the usr.sbin patch (should be applied from usr/src: patch -p0 < usr.sbin.diff). The caching daemon will be in /usr/sbin folder, its configuration and startup files will be in /etc folder. cached(8) and cached.conf(5) man pages would be availabe. To enable caching, just add "cache" source to the appropriate nsswitch.conf line (the "cache" source should be the first source for the database and it can't be used with the "compat" source). Please try the patches and send me your feedback. I also hope that there are no reasons not to merge changes, which were made to libc (they are in include.diff and libc.diff) into the CURRENT. As for the caching daemon (usr.sbin.diff patch) - I also think that it could be merged into the CURRENT. In the second release (will happen in 1-2 days - it needs additional testing) i'll add caching support for other nsswitch databases (the most important is the host database support, I believe). With best regards, Michael Bushkov Rostov State University