Commit Graph

11 Commits

Author SHA1 Message Date
Konstantin Belousov
6b462d2762 Increase YPMAXRECORD to 16M to be compatible with Linux.
Since YP protocol definition uses the constant to declare
variable-size opaque byte strings, the change should be binary
compatible with existing installations which do not expose keys or
values larger than 1024 bytes.

All uses of local variables with YPMAXRECORD sizes were removed to
avoid insane stack use.  On the other hand, variables with static
lifetime should be fine and only result in increased VA use.

Glibc made same change, increasing the allowed length for keys and
values in YP to 16M, in 2013.

Reviewed by:	markj
Discussed with:	ian
Sponsored by:	Mellanox Technologies
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D20900
2019-08-12 20:27:33 +00:00
Gabor Kovesdan
a2098fea6d - Correct mispellings of the word necessary
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:42:40 +00:00
David E. O'Brien
1542dbb49a Use __FBSDID vs. rcsid[]. 2003-05-04 02:51:42 +00:00
Ruslan Ermilov
8af1452cf8 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
Peter Wemm
a4add9a9b1 $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
Bruce Evans
2ab72cf580 Removed redundant declarations. rpcgen generates `typedef enum foo;'
from `enum foo;'.
1998-01-16 12:17:55 +00:00
Bill Paul
9bd1654ae3 Resolve conflicts. 1997-05-28 04:38:30 +00:00
Peter Wemm
79403fe300 Revert $FreeBSD$ to $Id$ 1997-02-23 09:21:14 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bill Paul
74e4b87eb6 There are a few small additions to the protocol to make it
easier to use in mixed environments:

- Add three new members to the request structure:

  - a filename specification
  - a database type specification
  - a system byte prder specification

  These allow the client to ask the server for a particular type of
  database (Berkeley DB hash/btree/recno, GNU GDBM, dbm, ndbm, etc...)
  and get back a meaningful error if the server doesn't support it.
  The byte order spec is needed if the database type is byte order
  sensntive. You don't, for example, want to read an ndbm database
  from a big endian machine on a little endian machine (the ndbm code
  will explode). The filename spec lets the client handle things like
  ndbm which uses two seperate files per database (foo.dir and foo.pag).
  The client can ask for each half, one at a time.

- Add a list of database types and byte order values. Each list has
  a wildcard 'ANY' entry which lets the client ask for whatever the
  server supports. (XFR_ENDIAN_ANY is useful with the Berkeley DB hash
  method for instance, since it isn't byte order sensitive.)

- Add two newserver failure codes: XFR_DB_TYPE_MISMATCH and
  XFR_DB_ENDIAN_MISMATCH. The server uses these to tell the client
  that it doesn't support the requested type/byte order.

These changes were made at the suggestion of Thorsten Kukuk, the
current maintainer of the Linux ypserv distribution. This allows
Linux and FreeBSD NIS servers to use the same ypxfrd protocol and
avoid accidentally exchanging incompatible map files.
1996-07-04 02:08:17 +00:00
Bill Paul
2f83f6d899 (I hope I'm doing this correctly.)
Import a my own little ypxfrd protocol. Note that this protocol is
_NOT_ the same as Sun's, which is proprietary.

This basically impliments an RPC-based file transfer protocol which
lets a slave server suck over a raw map database file from the master.
This is many times faster than the normal method, which requires reading
the records from ypserv via yp_all() and then creating a new database
on the fly, particularly when you have many tens of thousands of
records in a map (e.g. a huge passwd database).

The protocol number I chose falls within the 'user-specified' range.
Maybe we should register it with Sun so we can get an official vendor
number for it. :)
1996-06-05 02:42:33 +00:00