History log of /freebsd-current/usr.sbin/ypserv/Makefile.yp
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 00022bd0 18-Dec-2015 Hajimu UMEMOTO <ume@FreeBSD.org>

Generate ipnodes.by{addr,name} from /etc/hosts for compatibility with
FreeBSD local name resolution.
If /var/yp/ipnodes exists, we generate them from it for backward
compatibility.

Inspired by: NetBSD
MFC after: 1 week


# 4ba79bb4 18-Dec-2015 Hajimu UMEMOTO <ume@FreeBSD.org>

- Keep hosts.by{name,addr} IPv4 only.
- Add comment how we handle hosts and ipnodes. (from NetBSD)

MFC after: 1 week.


# fac7bc23 18-Aug-2015 Alan Somers <asomers@FreeBSD.org>

Serve /etc/eui64 via NIS.

The C library already knows how to lookup eui64 entries from NIS. For
example, fwcontrol(8) does it. But /var/yp/Makefile.dist doesn't build the
eui64 maps, and ypinit(8) doesn't push them to slaves. This change fixes
that.

Reviewed by: brooks, wblock
MFC after: 2 weeks
Sponsored by: SpectraLogic Corp
Differential Revision: https://reviews.freebsd.org/D3404


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 53c40578 25-Jun-2009 Brian Somers <brian@FreeBSD.org>

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


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 7d2155f0 08-Jun-2006 Maxim Konovalov <maxim@FreeBSD.org>

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

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


# f2a3dfe5 13-Apr-2006 Ruslan Ermilov <ru@FreeBSD.org>

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


# a89e588c 02-May-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

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.


# 0d3b8ac4 13-Jun-2003 Ruslan Ermilov <ru@FreeBSD.org>

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

Suggested by: Dan Nelson


# 80fc33c3 21-Mar-2003 Robert Drehmel <robert@FreeBSD.org>

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


# 3b056022 06-Feb-2002 Mark Murray <markm@FreeBSD.org>

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


# a00856a8 15-May-2001 Gregory Neil Shapiro <gshapiro@FreeBSD.org>

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

PR: misc/26648
MFC after: 3 days


# 1a6e52d0 06-Feb-2001 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>

Fix typo: seperate -> separate.

Seperate does not exist in the english language.


# 03806e0d 28-Jun-2000 Brian Somers <brian@FreeBSD.org>

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

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


# 6874ee73 15-Jun-2000 Brian Somers <brian@FreeBSD.org>

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

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


# 97d92980 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# b22e036e 22-Aug-1999 Bill Paul <wpaul@FreeBSD.org>

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.


# 81d30297 24-Jun-1999 Nick Hibma <n_hibma@FreeBSD.org>

Fix typo (missing double quote)


# 3939bb66 22-Jul-1998 Poul-Henning Kamp <phk@FreeBSD.org>

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>


# 32b14f69 21-Feb-1998 Bill Paul <wpaul@FreeBSD.org>

*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.)


# 98df2816 19-Feb-1998 Bill Paul <wpaul@FreeBSD.org>

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


# 9ac2a83a 17-Feb-1998 Bill Paul <wpaul@FreeBSD.org>

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


# f44298df 12-Feb-1998 Bill Paul <wpaul@FreeBSD.org>

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


# 1754677b 04-Feb-1998 Bill Paul <wpaul@FreeBSD.org>

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


# 0f87b00d 25-Jan-1998 Steve Price <steve@FreeBSD.org>

Allow comments to begin with multiple '#' characters.

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


# 13170f18 10-Nov-1997 Bill Paul <wpaul@FreeBSD.org>

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.


# 476602a9 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# aca49be3 09-Feb-1997 Bill Paul <wpaul@FreeBSD.org>

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.


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

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.


# 58dc1574 15-Nov-1996 Bill Paul <wpaul@FreeBSD.org>

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.


# 44519760 24-Oct-1996 Bill Paul <wpaul@FreeBSD.org>

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.


# d91013b5 09-Aug-1996 Adam David <adam@FreeBSD.org>

was missing @


# 88b4ff3c 25-Jul-1996 Peter Wemm <peter@FreeBSD.org>

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".


# a6dbeb65 24-Jul-1996 Peter Wemm <peter@FreeBSD.org>

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.


# 57948c0b 24-Jul-1996 Peter Wemm <peter@FreeBSD.org>

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"


# de88f160 18-Jul-1996 Adam David <adam@FreeBSD.org>

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


# 1fe3e67a 25-Jun-1996 Bill Paul <wpaul@FreeBSD.org>

Toss old mknetid script into the attic.

Adjust things slightly to support the new mknetid program.


# b3e93234 04-Jun-1996 Bill Paul <wpaul@FreeBSD.org>

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.


# 1fbdac93 31-May-1996 Bill Paul <wpaul@FreeBSD.org>

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.)


# b2264be8 27-Apr-1996 Bill Paul <wpaul@FreeBSD.org>

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.


# 920491cf 03-Feb-1996 Bill Paul <wpaul@FreeBSD.org>

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.


# 1fff226d 12-Jan-1996 Bill Paul <wpaul@FreeBSD.org>

Update pointer to yppush.

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


# 778c7b1c 16-Dec-1995 Bill Paul <wpaul@FreeBSD.org>

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.)