Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rpc.yppasswdd PR/44077: Dr. Wolfgang Stukenbrock: r...



details:   https://anonhg.NetBSD.org/src/rev/2f983b874416
branches:  trunk
changeset: 758602:2f983b874416
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 10 18:56:17 2010 +0000

description:
PR/44077: Dr. Wolfgang Stukenbrock: redundant xdr_passwd implementation should
be removed, and the one from -lrpcsvc should be used.

diffstat:

 usr.sbin/rpc.yppasswdd/Makefile        |   8 +-
 usr.sbin/rpc.yppasswdd/yppasswdd_xdr.c |  69 ----------------------------------
 2 files changed, 4 insertions(+), 73 deletions(-)

diffs (92 lines):

diff -r 228609f9c10a -r 2f983b874416 usr.sbin/rpc.yppasswdd/Makefile
--- a/usr.sbin/rpc.yppasswdd/Makefile   Wed Nov 10 18:28:29 2010 +0000
+++ b/usr.sbin/rpc.yppasswdd/Makefile   Wed Nov 10 18:56:17 2010 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.5 1998/07/29 01:19:00 simonb Exp $
+#      $NetBSD: Makefile,v 1.6 2010/11/10 18:56:17 christos Exp $
 
 PROG=  rpc.yppasswdd
-SRCS=  rpc.yppasswdd.c yppasswdd_xdr.c yppasswdd_mkpw.c
+SRCS=  rpc.yppasswdd.c yppasswdd_mkpw.c
 MAN=   rpc.yppasswdd.8
 
 MLINKS= rpc.yppasswdd.8 yppasswdd.8
-DPADD+= ${LIBCRYPT} ${LIBUTIL}
-LDADD+= -lcrypt -lutil
+DPADD+= ${LIBRPCSVC} ${LIBCRYPT} ${LIBUTIL}
+LDADD+= -lrpcsvc -lcrypt -lutil
 
 .include <bsd.prog.mk>
diff -r 228609f9c10a -r 2f983b874416 usr.sbin/rpc.yppasswdd/yppasswdd_xdr.c
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_xdr.c    Wed Nov 10 18:28:29 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*     $NetBSD: yppasswdd_xdr.c,v 1.3 2009/10/21 00:01:56 snj Exp $    */
-
-/*
- * Copyright (c) 1994 Mats O Jansson <moj%stacken.kth.se@localhost>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: yppasswdd_xdr.c,v 1.3 2009/10/21 00:01:56 snj Exp $");
-#endif /* not lint */
-
-#include <rpc/rpc.h>
-#include <rpcsvc/yppasswd.h>
-
-bool_t
-xdr_x_passwd(XDR *xdrs, x_passwd *objp)
-{
-
-       if (!xdr_string(xdrs, &objp->pw_name, ~0))
-               return (FALSE);
-       if (!xdr_string(xdrs, &objp->pw_passwd, ~0))
-               return (FALSE);
-       if (!xdr_int(xdrs, &objp->pw_uid))
-               return (FALSE);
-       if (!xdr_int(xdrs, &objp->pw_gid))
-               return (FALSE);
-       if (!xdr_string(xdrs, &objp->pw_gecos, ~0))
-               return (FALSE);
-       if (!xdr_string(xdrs, &objp->pw_dir, ~0))
-               return (FALSE);
-       if (!xdr_string(xdrs, &objp->pw_shell, ~0))
-               return (FALSE);
-
-       return (TRUE);
-}
-
-bool_t
-xdr_yppasswd(XDR *xdrs, yppasswd *objp)
-{
-
-       if (!xdr_string(xdrs, &objp->oldpass, ~0))
-               return (FALSE);
-       if (!xdr_x_passwd(xdrs, &objp->newpw))
-               return (FALSE);
-
-       return (TRUE);
-}



Home | Main Index | Thread Index | Old Index