FreeBSD Bugzilla – Attachment 30772 Details for
Bug 51628
[nis] ypmatch doesn't match keys in legacy NIS servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 911 bytes, created by
Keith White
on 2003-04-30 16:30:06 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Keith White
Created:
2003-04-30 16:30:06 UTC
Size:
911 bytes
patch
obsolete
>--- ypmatch.c.orig Wed Apr 30 10:02:54 2003 >+++ ypmatch.c Wed Apr 30 10:04:55 2003 >@@ -29,7 +29,7 @@ > > #ifndef lint > static const char rcsid[] = >- "$FreeBSD: src/usr.bin/ypmatch/ypmatch.c,v 1.7.2.2 2002/02/15 00:46:56 des Exp $"; >+ "$FreeBSD: src/usr.bin/ypmatch/ypmatch.c,v 1.7.2.X 2002/02/15 00:46:56 des Exp $"; > #endif /* not lint */ > > #include <sys/param.h> >@@ -117,6 +117,18 @@ > > r = yp_match(domainname, inmap, inkey, > strlen(inkey), &outbuf, &outbuflen); >+/* >+ If we failed, try again including the terminating NULL in the key. >+ Some NIS servers include the NULL, notably SunOS 4.X. >+*/ >+ if (r != 0 && r != YPERR_YPBIND) { >+ r = yp_match(domainname, inmap, inkey, >+ strlen(inkey)+1, &outbuf, &outbuflen); >+ if (r == 0 && outbuf[outbuflen-1] == '\0') { >+/* since we added a NULL, let's remove it from the result */ >+ --outbuflen; >+ } >+ } > switch (r) { > case 0: > if (key)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51628
: 30772