summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove multiply defined Id string. Hide sccsid string.charnier1997-10-131-8/+7
|
* Modify rpc.yppasswdd to use the new AF_LOCAL transport in the RPC librarywpaul1997-07-291-34/+57
| | | | | instead of its own kludged up version. This makes the special 'superuser-only' update procedure work just like a real RPC service.
* Revert $FreeBSD$ to $Id$peter1997-02-221-2/+2
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-2/+2
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix harmless bugs found while hunting for chpass nis failurepeter1996-11-151-3/+3
|
* Add extra sanity checking to the in-place update routine. Sometimes youwpaul1996-10-231-2/+33
| | | | | | | | | | | | | find two users with the same UID (i.e. root and toor), but yp_mkdb(8) forbits duplicate keys, so only one of them will end up in the *.byuid maps (probably toor, since it comes after root in the template file). If I asked rpc.yppasswdd(8) to change toor's password, it would update the *.byname maps correctly, but incorrectly modify root's entry in the *.byuid maps since the only matching record with UID=0 in those maps belongs to root. To fix this, we check that both the name and UID are correct before trying to write new entries to the maps.
* When updating a password via the standard RPC handler, reset the passwordwpaul1996-09-051-2/+3
| | | | change time (pw_change) to zero.
* Fix a couple of bogons. The first two were brought to my attentionwpaul1996-08-041-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | by Peter Wemm: - In yppasswdproc_update_1_svc(), I wasn't paying attention and put a couple of lines of code _after_ a return() instead of before. (*blush*) - The removal of certain temp files didn't always work (this showed up mostly if you were using /etc/master.passwd as your NIS passwd template instead of /var/yp/master.passwd). This is because the whole temp file creation mechanism I was using was tragically broken (you can't rename across filesystems). This problem I found myself: - If you have a very large password database (30,000 or more entries), there can be a delay of several seconds while pw_copy() copies the ASCII template file and subsitutes in the modified/new entry. During this time, the clnt_udp() code in the RPC library may get impatient and retry its request. This will get queued at the server and be treated as a second request. By then the password change will have been completed and the second request will fail (the old password is no longer valid). To attempt to fix this, we save the IP address and port of each request and ignore any subsequent requests from the same IP and same port that arrive within five minutes of each other.
* Implement incremental passwd database updates. This is done by ading a '-u'guido1996-07-011-4/+4
| | | | | | | | | | | | | | option to pwd_mkdb and adding this option to utilities invoking it. Further, the filling of both the secure and insecure databases has been merged into one loop giving also a performance improvemnet. Note that I did *not* change the adduser command. I don't read perl (it is a write only language anyway). The change will drastically improve performance for passwd and friends with large passwd files. Vipw's performance won't change. In order to do that some kind of diff should be made between the old and new master.passwd and depending the amount of changes, an incremental or complete update of the databases should be agreed upon.
* Whoops: had a couple of hardcoded instances of '/var/yp/' that shouldn'twpaul1996-06-231-4/+4
| | | | have been there. Fixed to use yp_dir, which can be set on the command line.
* Added support for in-place updates:wpaul1996-06-051-7/+141
| | | | | | | | | | | | | | | | | If rpc.yppasswdd is invoked with the -i flag, password changes will be made to the master.passwd template file and the hash map files in-place, which means it won't have to run a complete map update. Instead, it calls /var/yp/Makefile with the 'pushpw' target, which just pushes the maps to the slaves and runs yp_mkdb -c to tell the local ypserv to flush its database cache. The server will check the passwd.byname and passwd.byuid maps to see if they were built in 'insecure' or 'secure' mode (i.e. with real encrypted passwords in them or without) and update them accordingly. This combined with rpc.ypxfrd greatly reduces the amount of time it takes to complete an NIS password change, especially with very large passwd databases.
* Fix 'multidomain' code. It returns a pointer to memory that it doesn'twpaul1996-05-081-8/+6
| | | | | | | | | | | | | | | | | really own (and which can end up being mangled later). The manifestation of this bug is that the first attempt by a user to change their NIS password succeeds, but all subsequent attempts fail. rpc.yppasswdd also logs a message about not being able to find a file called '/var/yp/<some garbage string>/master.passwd.' (Note that for some bizarre reason, this doesn't happen with the malloc() from FreeBSD 2.1.0. I suppose this means we can chalk up another victory for phkmalloc. :) This bug only occurs if you use the -m flag with rpc.yppasswdd. Fix this by copying the domain name to a static buffer and returning a pointer to that instead. Reported by: Jian-Da Li (jdli@csie.nctu.edu.tw)
* Add securenets support (uses same access control mechanism as ypserv,wpaul1996-02-241-2/+8
| | | | | | | | | | | | | | | also controlled by /var/yp/securenets). Add -u flag to turn off the privileged port check done by yp_access(); some commercial systems (IRIX, Solaris 2.x, HP-UX, and probably others) don't use a reserved port for submitting yppasswd updates. If we always enforce the check, these client systems will be unable to submit updates to us. Document securenets support and -u flag in man page. Like ypserv, you can compile rpc.yppasswdd to use the tcpwrapper package instead of securenets if you want to.
* This commit was generated by cvs2svn to compensate for changes in r14062,wpaul1996-02-121-0/+649
which included commits to RCS files with non-trunk default branches.
OpenPOWER on IntegriCloud