From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 27 07:50:40 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC91416A46E for ; Mon, 27 Mar 2006 07:50:40 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 392FF43D5C for ; Mon, 27 Mar 2006 07:50:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2R7oPRW049143 for ; Mon, 27 Mar 2006 07:50:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2R7oP5A049142; Mon, 27 Mar 2006 07:50:25 GMT (envelope-from gnats) Date: Mon, 27 Mar 2006 07:50:25 GMT Message-Id: <200603270750.k2R7oP5A049142@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Andreas Steinel Cc: Subject: Re: bin/66893: [patch] rpc.yppasswdd(8): Linux NIS clients connecting to FreeBSD NIS servers get authentication failure X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andreas Steinel List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2006 07:50:41 -0000 The following reply was made to PR bin/66893; it has been noted by GNATS. From: Andreas Steinel To: bug-followup@freebsd.org, sgrig@aegean.dmst.aueb.gr Cc: Subject: Re: bin/66893: [patch] rpc.yppasswdd(8): Linux NIS clients connecting to FreeBSD NIS servers get authentication failure Date: Mon, 27 Mar 2006 07:46:31 +0000 --nextPart7622022.hpBz1yctux Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I write a mail to freebsd-bugs [1] and I get answer to make a pr. So I=20 searched the bug reports and find this open bug. I think that my patch [2] could help to solve the bug in such a way that yo= u=20 don'nt need to patch ypasswd or some c-program else. Only apply the patch a= nd=20 everything works fine. With best regards Andreas Sources: [1] http://lists.freebsd.org/pipermail/freebsd-bugs/2006-March/017532.html [2] http://w5/~lnxbil/bsd-patches/nis-clients-unter-linux.patch Inline Patch: =2D-- Makefile.dist Thu Nov 3 09:12:04 2005 +++ Makefile Fri Mar 17 09:55:48 2006 @@ -40,6 +40,11 @@ # key will be removed from these maps, allowing anyone to access them. S=3D-s =20 +# If you want to have linux NIS clients you must enable this: +# Comment the line if you have no linux NIS clients +#LINUXCOMPMODE=3D1 + + # These are commands which this Makefile needs to properly rebuild the # NIS databases. Don't change these unless you have a good reason. Also # be sure not to place an @ in front of /usr/bin/awk: it isn't necessary @@ -196,6 +201,7 @@ aliases: mail.aliases =20 master.passwd: master.passwd.byname master.passwd.byuid +master.passwd: shadow.byname =20 # # This is a special target used only when doing in-place updates with @@ -498,6 +504,16 @@ =20 $(PASSWD): $(MASTER) @echo "Creating new $@ file from $(MASTER)..." +.if defined(LINUXCOMPMODE) + @if [ ! $(UNSECURE) ]; then \ + $(AWK) -F: '{if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ + print $$1":x:"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ + > $(PASSWD) ; \ + else \ + $(AWK) -F: '{if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ + print $$1":"$$2":"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ + > $(PASSWD) ; fi +.else @if [ ! $(UNSECURE) ]; then \ $(AWK) -F: '{if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ print $$1":*:"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ @@ -506,6 +522,7 @@ $(AWK) -F: '{if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ print $$1":"$$2":"$$3":"$$4":"$$8":"$$9":"$$10}' $(MASTER) \ > $(PASSWD) ; fi +.endif =20 =20 passwd.byname: $(PASSWD) @@ -613,3 +630,20 @@ @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi =20 + +shadow.byname: $(MASTER) +.if defined(LINUXCOMPMODE) + @echo "Updating $@..." +.if ${MASTER} =3D=3D "/dev/null" + @echo "Master.passwd source file not found -- skipping" +.else + @cat $(MASTER) | \ + $(AWK) -F: '{ if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ + print $$1"\t"$$1":"$$2":::::::" }' $^ \ + | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP)= ; \ + $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif +.endif =2D-=20 Andreas Steinel email: lnxbil@xantippe.cs.uni-sb.de Zimmer 122 web: http://w5.cs.uni-sb.de Bau 36.1 Phone: +49 (0) 681 302-4135 Lehrstuhl Prof. Wahlster fax: +49 (0) 12 12 / 52 35 64 89 =46akult=E4t 6 - Informatik =20 Universit=E4t des Saarlandes =20 66123 Saarbr=FCcken =20 GPG-Fingerprint: C09D 96DD 548C 8F13 097A 8D04 8329 7BEA A623 11D6 --nextPart7622022.hpBz1yctux Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEJ5hcgyl76qYjEdYRAsbHAJ9iG1a0ehjIbTq7bFORJgHwoz/L2ACgq6NW 2RX0uW2UEIRb/eKAv+OaNNw= =9Kq9 -----END PGP SIGNATURE----- --nextPart7622022.hpBz1yctux--