History log of /freebsd-9.3-release/usr.sbin/ypserv/Makefile.yp
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 194968 25-Jun-2009 brian

Support shadow.byname and shadow.byuid maps, protecting them by
insisting on privileged port access.

Include /var/yp/Makefile.local if it exists and suggest using
it to override /var/yp/Makefile behaviour.

Approved by: re (kib)
MFC after: 3 weeks


# 159394 08-Jun-2006 maxim

o NIS clients ask for "shells" map not "shells.list".

PR: kern/86693
Submitted by: Victor Sudakov
MFC after: 1 month


# 157722 13-Apr-2006 ru

- Let make(1) track dependencies and regen netid map when needed.
- Add missing dependency for netid.byname.


# 145801 02-May-2005 ume

add targets for ipnodes.byname and ipnodes.byaddr which carries
IPv6 addresses. these targets are off by default, and these
are built when there is /var/yp/ipnodes.


# 116301 13-Jun-2003 ru

Eliminated two dozens of superfluous cats and two r-cats (sorry, Jordan).

Suggested by: Dan Nelson


# 112458 21-Mar-2003 robert

Add a target for the creation of a /etc/shells map and add it to
the maps which are built by default.


# 90320 06-Feb-2002 markm

Fix an inconsistency between what FreeBSD NIS and AMD think the
AMD map name should be.


# 76621 15-May-2001 gshapiro

The aliases file now lives in /etc/mail/.

PR: misc/26648
MFC after: 3 days


# 72091 06-Feb-2001 asmodai

Fix typo: seperate -> separate.

Seperate does not exist in the english language.


# 62210 28-Jun-2000 brian

Further protection against comments in /etc/{passwd,group}

Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
PR: 14269


# 61707 15-Jun-2000 brian

Handle comments and empty lines when generating YP passwd and group files

PR: 14269
Submitted by: howard@ee.utah.edu


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 50159 22-Aug-1999 wpaul

Modify yp_mkdb so that it only checks for bogus '+' and '-' characters
in source input if the -f flag is used, and modify Makefile.yp to only
use -f for the passwd, master.passwd and group maps. These should be
the only ones for which the + and - characters have special meaning
that make it important for us to avoid letting them into any of the map
databases. In some cases (namely the automounter maps) we have to allow
at least the - character through in order to create the map properly.

This closes PR #8699.


# 48199 24-Jun-1999 n_hibma

Fix typo (missing double quote)


# 37819 22-Jul-1998 phk

A comment in /usr/src/usr.sbin/ypserv/Makefile.yp
(a.k.a. /var/yp/Makefile.dist) refers to an obsoleted usage of the
-m option of rpc.yppasswdd. It is currently taken over by the -t
option. -m is used for a different purpose now.

PR: 7279
Reviewed by: phk
Submitted by: Amakawa Shuhei <amakawa@nebula.sf.t.u-tokyo.ac.jp>


# 33719 21-Feb-1998 wpaul

*sigh* I will not commit late at night. I will not commit late at night.
I will not commit late at night. I will not commit late at night.

I swear it's been Monday all week for me.

Apply proper fix for services target submitted by Andre Albsmeier
<andre.albsmeier@mchp.siemens.de>. Sorry for botching this that last
time, Andre. (Could have been worse: t least I didn't break the build.)


# 33640 20-Feb-1998 wpaul

Arghhh.... another missing backslash. Yes, I feel stupid.


# 33536 18-Feb-1998 wpaul

Doh! Replace backslash that got eaten by gremlins in the last commit.


# 33300 13-Feb-1998 wpaul

Close PR #2206: fix the services.byname target so that it can handle
/etc/services entries with any protocol instead of just udp and tcp.
Rather thani having the awk script explicitly search for 'udp' or 'tcp'
in the second field using index(), use split() to break up the field
at the '/' character if it exists, which extracts the protocol from
the field no matter what it is.

PR: 2206


# 33100 04-Feb-1998 wpaul

Fix Makefile.yp so that it no longer creates a temporary file called
/tmp/ypmake, thereby fixing problems with successive map updates
possibly reading stale copies of this file left behind by a previous
failed run.

PR: 5571


# 32775 25-Jan-1998 steve

Allow comments to begin with multiple '#' characters.

PR: 4452
Submitted by: Joao Carlos Mendes Luis <Jonny@mailhost.coppe.ufrj.br>


# 31110 10-Nov-1997 wpaul

Add a ypinit script and man page (script lifted from OpenBSD and haqued
to work on FreeBSD, man page written by me.)

Also change Makefile.yp a little to be more tolerane in the face of
missing source files. Print a message if we can't find /var/yp/master.passwd
telling the user what to do to fix things.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 22495 09-Feb-1997 wpaul

Two small tweaks:

- servers should be the first target listed in 'all:' in order for slave
servers to be updated correctly: yppush reads the ypservers map to figure
out where all the slaves are, so it needs to be loaded onto the master
ASAP.

- Fixed small bogon in publickey target which nobody has noticed since
we're not using the publickey.byname map yet.


# 21673 14-Jan-1997 jkh

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.


# 19785 15-Nov-1996 wpaul

Eek! When I added the YP_INTERDOMAIN and YP_SECURE support, I documented
and set the B and S variables here, but I forgot to actually add them to
the master.passwd and hosts.* targets. In other words, they weren't being
passed to yp_mkdb as needed.

This needs to go into 2.2; it doesn't break things a lot, but it leaves
your master.passwd maps available to unprivileged users without you
realizing it.


# 19161 24-Oct-1996 wpaul

Add support for handling the YP_SECURE and YP_INTERDOMAIN keys from
any maps that may have them. If the YP_SECURE key is present, ypserv
will only allow access to the map from clients on reserved ports.
If the YP_INTERDOMAIN key is present, the server will do DNS lookups
for hostnames that it can't find in hosts.byname or hosts.byaddr.
This is the same as the -d flag (which is retained for backwards
compatibility) but it can be set on a per-map/per-domain basis.

Also modified /var/yp/Makefile to add YP_INTERDOMAIN to the hosts.*
maps and YP_SECURE to master.passwd.* maps by default.


# 17481 09-Aug-1996 adam

was missing @


# 17288 25-Jul-1996 peter

Fix the services.byname target so that it creates search keys for the
aliases of the "official" names as well, because now that getportbyname()
does a yp match, it no longer found the entries under the alias.
This broke rsh(1), because it looks up "shell/tcp" while the official
name in /etc/services is "cmd/tcp".


# 17268 24-Jul-1996 peter

Fix typo in last commit, it seems that a hash comments out a \ at the end
of line.

Also, fix existing bug in ethers.byname, it was passing an unknown option
to yppush. This appears to have been a cut/paste slip intended for a
$(DBLOAD) command above it.


# 17266 24-Jul-1996 peter

Add sample rules for amd.host, mostly from the AMD docs, but tweaked to fit
the FreeBSD Makefile.yp structure by me. This allows you to have a single
amd map for all machines in a cluster.

In /etc/sysconfig, it would look something like:
amdflags="-p -a /net -c 1800 -l syslog /host amd.host"


# 17220 18-Jul-1996 adam

'mkaliases' is broken (strips spaces) so don't use it,
perhaps it can be removed altogether.
corrected typos


# 16732 25-Jun-1996 wpaul

Toss old mknetid script into the attic.

Adjust things slightly to support the new mknetid program.


# 16118 05-Jun-1996 wpaul

Makefile.yp:

- Add a 'pushpw' target that only yppushes the various passwd maps
and sends a YPPROC_CLEAR to the local ypserv. This will be used by
rpc.yppasswdd once I merge in the in-place update changes.

yp_access.c:

- Make the yp_access() function print RPC program and procedure numbers
that it doesn't know about in literal form. This will allow it to work
with other prgrams that it doesn't know about, like rpc.ypxfrd I'm going
to import shortly.

yp_dblookup.c:

- Take out the __inline keywords. They weren't really helping me anyway.

- Somehow I broke yp_next() when DB_CACHE wasn't #defined. Fix it.

- Also fix potential case where yp_next() might loop forever; make sure
it checks the return values of all the (dbp->seq)()/R_NEXT calls that
it does as well as comparing keys.


# 16044 31-May-1996 wpaul

Small touch-ups -- no functional changes.

Fix some comments to reflect reality (in some cases I made changes
to code but not to the comments).

Change some instances of 'inline' to '__inline' to pacify
gcc -ansi -pedantic.

Use rcsid strings more consistently.

Make 'oldaddr' static in yp_access().

Use strcpy()/strcat() in yp_open_db_cache() instead of snprintf().
(Seems to be a little faster this way.)


# 15426 28-Apr-1996 wpaul

Performance enhancements (I hope) and new stuff:

yp_dblookup.c:

- Implement database handle caching. What this means is that instead
of opening and closing map databases for each request, we open a
database and save the handle (and, if requested, the key index)
in an array. This saves a bit of overhead on things like repeated
YPPROC_NEXT calls, such as you'd get from getpwent(). Normally,
each YPPROC_NEXT would require open()ing the database, seeking
to the location supplied by the caller (which is time consuming with
hash databases as the R_CURSOR flag doesn't work), reading the
data, close()ing the database and then shipping the data off to
the caller. The system call overhead is prohibitive, especially
with very large maps. By caching the handle to an open database,
we elimitate at least the open()/close() system calls, as well
as the associated DB setup and tear-down operations, for a large
percentage of the time. This improves performance substantially at
the cost of consuming a little more memory than before.

Note that all the caching support is surrounded by #ifdef DB_CACHE
so that this same source module can still be used by other programs
that don't need it.

- Make yp_open_db() call yp_validdomain(). Doing it here saves cycles
when caching is enabled since a hit on the map cache list by
definition means that the domain being referenced is valid.

- Also make yp_open_db() check for exhaustion of file descriptors,
just in case.

yp_server.c:

- Reorganize things a little to take advantage of the database
handle caching. Add a call to yp_flush_all() in ypproc_clear_2_svc().

- Remove calls to yp_validdomain() from some of the service procedures.
yp_validdomain() is called inside yp_open_db() now, so procedures that
call into the database package don't need to use yp_validdomain()
themselves.

- Fix a bogosity in ypproc_maplist_2_svc(): don't summarily initiallize
the result.maps pointer to NULL. This causes yp_maplist_free()
to fail and leaks memory.

- Make ypproc_master_2_svc() copy the string it gets from the database
package into a private static buffer before trying to NUL terminate it.
This is necessary with the DB handle caching: stuffing a NUL into the
data returned by DB package will goof it up internally.

yp_main.c:

- Stuff for DB handle caching: call yp_init_dbs() to clear the
handle array and add call to yp_flush_all() to the SIGHUP
signal handler.

Makefile.yp:

- Reorganize to deal with database caching. yp_mkdb(8) can now be used
to send a YPPROC_CLEAR signal to ypserv(8). Call it after each map
is created to refresh ypserv's cache.

- Add support for mail.alias map.
Contributed by Mike Murphy (mrm@sceard.com).

- Make default location for the netgroups source file be /var/yp/netgroup
instead of /etc/netgroup.

mkaliases:

- New file: script to generate mail.alias map.
Contributed by Mike Murphy (mrm@sceard.com).

Makefile:

- Install Makefile.yp as /var/yp/Makefile.dist and link it to
/var/yp/Makefile only if /var/yp/Makefile doesn't already exist.
Suggested by Peter Wemm.

- Install new mkaliases script in /usr/libexec along with mknetid.

- Use somewhat saner approach to generating rpcgen-dependent files
as suggested by Garrett Wollman.


# 13896 04-Feb-1996 wpaul

Makefile.yp:
- Improve support for multiple domains. (In preparation for new rpc.yppasswdd.)

yp_dblookup.c:
- Improve error reporting: be more selective as to what error code
we return when a (dbp->get) fails.


# 13398 12-Jan-1996 wpaul

Update pointer to yppush.

(And now, on to rpc.yppasswdd...)


# 12892 16-Dec-1995 wpaul

This commit was generated by cvs2svn to compensate for changes in r12891,
which included commits to RCS files with non-trunk default branches.


# 12891 16-Dec-1995 wpaul

Import the new, non-GPL ypserv, written by yours truly. Functionally
equivalent to the old ypserv, except that it doesn't support the
-p [port] option to force the server to use a particular port.

The server stubs and yp.h header file are auto-generated from the yp.x
protocol definition file. The auto-generated XDR routines in libc/yp
are also used. The database access code has been broken out into a
seperate module so that other NIS utilities (ypxfr in particular)
can use it.

Note that the old mknetid script is being temporarily moved here; it
will be replaced by an mknetid program which will eventually have
a home under /usr/src/libexec. (The existing script is actually
somewhat broken -- it doesn't handle hosts -- but this isn't a big
deal at this point since the netid.byname map is really only useful
fopr Secure RPC, which we don't have yet.)