Date: Tue, 02 Feb 1999 13:43:43 +0500 From: Konstantin Chuguev <joy@urc.ac.ru> To: Alfred Perlstein <bright@hotjobs.com> Cc: hackers@FreeBSD.ORG Subject: Re: YP-like mySQL thing Message-ID: <36B6BABF.EA062592@urc.ac.ru> References: <Pine.BSF.4.05.9902020332100.535-100000@bright.fx.genx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote: > On Tue, 2 Feb 1999, Konstantin Chuguev wrote: > > > > Hello! > > > > > > I've made a patch to libc to allow YP-like extension of passwd file using mySQL. > > > > > > I can share it if anyone is interested, and I need an advise: how should I > > > rebuild libc.so (or what else?) so that shared executables would pick > > > libmysqlclient.so without rebuilding? > > > > > > > I am very interesting in it. Actually, I need getpwent and getgrent to look at > > PostgreSQL database. > > But it is very similar to mySQL in the way of function calls. And it is much easier > > to change your code slightly than the original libc code. > > > > About dynamic loading lib*.so from libc.so - I have the same question. > > > > It would be nice if FreeBSD has an abstract layer for getpwent/getgrent, similar to > > PAM in the concept (you can name it "Pluggable Authorization Modules" :-) Are > > there any plans of implementing this in 4.0? > > i think 3.0-release and later has pam. > > man pam > No. That's another thing. Using PAM, I can authenticate a user, i.e. allow or disallow him to enter the system, and I have to use PAM API explicitly. login, su, xdm do this way. What is proposed, is to extend the existing mechanism of storing UNIX user information (all /etc/master.passwd stuff like uid, gid, home_dir etc.). Now you can use only /etc/[master.]passwd and YP (NIS). Someone would like to use a DBMS like mySQL or PostgreSQL for that purposes as well. Technically, it could be done by inserting an abstract layer in few files of libc, namely getpwent.c and getgrent.c, instead of hardcoding YP requests to a YP-server. The one problem is that DBMS API requires using libraries which are not in the FreeBSD distribution, only in ports. And one needs to avoid linking such libraries explicitly for every object file using getpwent etc. -- Konstantin V. Chuguev. System administrator of Southern http://www.urc.ac.ru/~joy/ Ural Regional Center of FREEnet, mailto:joy@urc.ac.ru Chelyabinsk, Russia. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36B6BABF.EA062592>