summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1996-07-01 19:38:50 +0000
committerguido <guido@FreeBSD.org>1996-07-01 19:38:50 +0000
commit70bae2bee199f1171426e884d9dd14bcf0c85eb7 (patch)
tree4bfb5d9e29eba41cf2d104fc69a77e860b476e6b /usr.sbin/rpc.yppasswdd/yppasswdd_server.c
parent9f2f4504f0af05668863538cc309552906b0a9da (diff)
downloadFreeBSD-src-70bae2bee199f1171426e884d9dd14bcf0c85eb7.zip
FreeBSD-src-70bae2bee199f1171426e884d9dd14bcf0c85eb7.tar.gz
Implement incremental passwd database updates. This is done by ading a '-u'
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.
Diffstat (limited to 'usr.sbin/rpc.yppasswdd/yppasswdd_server.c')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
index f7df723..814025b 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yppasswdd_server.c,v 1.17 1996/06/23 22:20:43 wpaul Exp $
+ * $Id: yppasswdd_server.c,v 1.5 1996/06/23 22:44:06 wpaul Exp $
*/
#include <stdio.h>
@@ -61,7 +61,7 @@ struct dom_binding {};
#include "yppasswd_comm.h"
#ifndef lint
-static const char rcsid[] = "$Id: yppasswdd_server.c,v 1.17 1996/06/23 22:20:43 wpaul Exp $";
+static const char rcsid[] = "$Id: yppasswdd_server.c,v 1.5 1996/06/23 22:44:06 wpaul Exp $";
#endif /* not lint */
char *tempname;
@@ -567,7 +567,7 @@ cleaning up and bailing out");
if (strcmp(passfile, _PATH_MASTERPASSWD)) {
rename(tempname, passfile);
} else {
- if (pw_mkdb() < 0) {
+ if (pw_mkdb(argp->newpw.pw_name) < 0) {
yp_error("pwd_mkdb failed");
return(&result);
}
@@ -718,7 +718,7 @@ cleaning up and bailing out");
if (strcmp(passfile, _PATH_MASTERPASSWD)) {
rename(tempname, passfile);
} else {
- if (pw_mkdb() < 0) {
+ if (pw_mkdb(argp->newpw.pw_name) < 0) {
yp_error("pwd_mkdb failed");
return(result);
}
OpenPOWER on IntegriCloud