bin/66893: [patch] rpc.yppasswdd(8): Linux NIS clients
connecting to FreeBSD NIS servers get authentication failure
Andreas Steinel
lnxbil at cs.uni-sb.de
Mon Mar 27 07:50:41 UTC 2006
The following reply was made to PR bin/66893; it has been noted by GNATS.
From: Andreas Steinel <lnxbil at cs.uni-sb.de>
To: bug-followup at freebsd.org, sgrig at 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 at 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--
More information about the freebsd-bugs
mailing list