summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/getpwent.330
-rw-r--r--libexec/rpc.yppasswdd/rpc.yppasswdd.85
-rw-r--r--share/man/man5/passwd.55
-rw-r--r--share/man/man8/yp.87
-rw-r--r--usr.sbin/ypserv/makedbm/makedbm.85
-rw-r--r--usr.sbin/ypserv/ypinit/Makefile4
-rw-r--r--usr.sbin/ypserv/ypinit/Makefile.yp.8265
-rw-r--r--usr.sbin/ypserv/ypinit/ypinit.85
-rw-r--r--usr.sbin/ypserv/yppush/yppush.85
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv.85
10 files changed, 316 insertions, 20 deletions
diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3
index c2a1d733743..bc5d092c23f 100644
--- a/lib/libc/gen/getpwent.3
+++ b/lib/libc/gen/getpwent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getpwent.3,v 1.22 2008/06/24 14:27:24 deraadt Exp $
+.\" $OpenBSD: getpwent.3,v 1.23 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 24 2008 $
+.Dd $Mdocdate: October 22 2008 $
.Dt GETPWENT 3
.Os
.Sh NAME
@@ -141,6 +141,28 @@ If the process which calls them has an effective UID of 0 or has the
group in its group vector, the encrypted password will be returned, otherwise,
the password field of the returned structure will point to the string
.Ql * .
+.Sh YP SUPPORT
+If YP is active, the functions
+.Fn getpwent ,
+.Fn getpwnam ,
+and
+.Fn getpwnam_r
+also use the
+.Pa master.passwd.byname
+YP map (if available) or the
+.Pa passwd.byname
+YP map; and the functions
+.Fn getpwuid
+and
+.Fn getpwuid_r
+also use the
+.Pa master.passwd.byuid
+YP map (if available) or the
+.Pa passwd.byuid
+YP map.
+This is in addition to the passwd file,
+and respects the order of both normal and YP
+entries in the passwd file.
.Sh RETURN VALUES
The functions
.Fn getpwent ,
@@ -185,8 +207,10 @@ a Version 7 format password file
.Xr getgrouplist 3 ,
.Xr pw_dup 3 ,
.Xr passwd 5 ,
+.Xr Makefile.yp 8 ,
.Xr pwd_mkdb 8 ,
-.Xr vipw 8
+.Xr vipw 8 ,
+.Xr yp 8
.Sh HISTORY
The
.Fn getpwent ,
diff --git a/libexec/rpc.yppasswdd/rpc.yppasswdd.8 b/libexec/rpc.yppasswdd/rpc.yppasswdd.8
index 29359d4a77d..621bf641b09 100644
--- a/libexec/rpc.yppasswdd/rpc.yppasswdd.8
+++ b/libexec/rpc.yppasswdd/rpc.yppasswdd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rpc.yppasswdd.8,v 1.21 2008/05/17 23:31:52 sobrado Exp $
+.\" $OpenBSD: rpc.yppasswdd.8,v 1.22 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: May 17 2008 $
+.Dd $Mdocdate: October 22 2008 $
.Dt RPC.YPPASSWDD 8
.Os
.Sh NAME
@@ -87,6 +87,7 @@ Don't allow changes of the shell field in the passwd file.
.Xr make 1 ,
.Xr securenet 5 ,
.Xr ypserv.acl 5 ,
+.Xr Makefile.yp 8 ,
.Xr yp 8 ,
.Xr ypbind 8
.Sh AUTHORS
diff --git a/share/man/man5/passwd.5 b/share/man/man5/passwd.5
index 6b94796f087..21b45e1ad33 100644
--- a/share/man/man5/passwd.5
+++ b/share/man/man5/passwd.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: passwd.5,v 1.33 2007/05/31 19:19:58 jmc Exp $
+.\" $OpenBSD: passwd.5,v 1.34 2008/10/22 20:31:20 jmc Exp $
.\" $NetBSD: passwd.5,v 1.4 1995/07/28 06:46:05 phil Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
@@ -31,7 +31,7 @@
.\"
.\" @(#)passwd.5 8.1 (Berkeley) 6/5/93
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 22 2008 $
.Dt PASSWD 5
.Os
.Sh NAME
@@ -287,6 +287,7 @@ containing:
.Xr login.conf 5 ,
.Xr netgroup 5 ,
.Xr adduser 8 ,
+.Xr Makefile.yp 8 ,
.Xr pwd_mkdb 8 ,
.Xr vipw 8 ,
.Xr yp 8
diff --git a/share/man/man8/yp.8 b/share/man/man8/yp.8
index 19d6e40e274..54ba1b12b79 100644
--- a/share/man/man8/yp.8
+++ b/share/man/man8/yp.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: yp.8,v 1.27 2008/06/12 21:46:48 sobrado Exp $
+.\" $OpenBSD: yp.8,v 1.28 2008/10/22 20:31:20 jmc Exp $
.\" $NetBSD: yp.8,v 1.9 1995/08/11 01:16:52 thorpej Exp $
.\"
.\" Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 12 2008 $
+.Dd $Mdocdate: October 22 2008 $
.Dt YP 8
.Os
.Sh NAME
@@ -147,7 +147,7 @@ server will be set up in backwards compatible mode.
To enable
.Dq secure
mode, the file
-.Pa /var/yp/Makefile.yp
+.Xr Makefile.yp 8
must be edited.
This
.Dq secure
@@ -206,6 +206,7 @@ YP maps Makefile
.Xr group 5 ,
.Xr passwd 5 ,
.Xr resolv.conf 5 ,
+.Xr Makefile.yp 8 ,
.Xr portmap 8 ,
.Xr rpc.yppasswdd 8 ,
.Xr ypbind 8 ,
diff --git a/usr.sbin/ypserv/makedbm/makedbm.8 b/usr.sbin/ypserv/makedbm/makedbm.8
index 6c51dc450cd..60c0df5e2f1 100644
--- a/usr.sbin/ypserv/makedbm/makedbm.8
+++ b/usr.sbin/ypserv/makedbm/makedbm.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: makedbm.8,v 1.16 2007/05/31 19:20:30 jmc Exp $
+.\" $OpenBSD: makedbm.8,v 1.17 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 22 2008 $
.Dt MAKEDBM 8
.Os
.Sh NAME
@@ -86,6 +86,7 @@ Dump a database to standard output.
.El
.Sh SEE ALSO
.Xr db 3 ,
+.Xr Makefile.yp 8 ,
.Xr yp 8 ,
.Xr ypserv 8 ,
.Xr ypxfr 8
diff --git a/usr.sbin/ypserv/ypinit/Makefile b/usr.sbin/ypserv/ypinit/Makefile
index 26f3a3f4fa8..12dd3ee28c6 100644
--- a/usr.sbin/ypserv/ypinit/Makefile
+++ b/usr.sbin/ypserv/ypinit/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.14 1997/04/29 11:27:12 niklas Exp $
+# $OpenBSD: Makefile,v 1.15 2008/10/22 20:31:20 jmc Exp $
-MAN= ypinit.8
+MAN= Makefile.yp.8 ypinit.8
DISTFILES= Makefile.main Makefile.yp
SHFILES= ypinit.sh
diff --git a/usr.sbin/ypserv/ypinit/Makefile.yp.8 b/usr.sbin/ypserv/ypinit/Makefile.yp.8
new file mode 100644
index 00000000000..a5f11b327c5
--- /dev/null
+++ b/usr.sbin/ypserv/ypinit/Makefile.yp.8
@@ -0,0 +1,265 @@
+.\" $OpenBSD: Makefile.yp.8,v 1.1 2008/10/22 20:31:20 jmc Exp $
+.\"
+.\" Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: October 22 2008 $
+.Dt MAKEFILE.YP 8
+.Os
+.Sh NAME
+.Nm Makefile.yp
+.Nd generate and distribute YP maps
+.Sh SYNOPSIS
+.Li cd /var/yp; make
+.Sh DESCRIPTION
+The
+.Nm
+utility generates or updates the YP maps to be served by
+.Xr ypserv 8 .
+.Pp
+Each YP domain to be served must have its own subdirectory below
+.Pa /var/yp .
+Use
+.Xr ypinit 8
+to set up such subdirectories.
+In particular,
+.Xr ypinit 8
+will copy
+.Pa /var/yp/Makefile.yp
+into each new domain subdirectory.
+For common configuration changes affecting all future domains, edit
+.Pa /var/yp/Makefile.yp
+before running
+.Xr ypinit 8 .
+For configuration changes affecting only one individual domain, edit the
+.Pa Makefile
+in the respective domain subdirectory after running
+.Xr ypinit 8 .
+Do
+.Em not
+edit
+.Pa /var/yp/Makefile.yp.dist .
+.Pp
+By default, input data for generating YP maps is collected from the
+.Pa /etc
+directory.
+Edit the
+.Dv DIR
+variable to choose a different source directory.
+.Pp
+To regenerate all maps for all domains, run
+.Xr make 1
+in
+.Pa /var/yp .
+To regenerate all maps for one single domain, run
+.Xr make 1
+in the respective domain subdirectory.
+The
+.Xr makedbm 8
+utility will be used to create the maps in
+.Xr db 3
+format, and they will be stored inside the appropriate domain subdirectory.
+.Pp
+Whenever a YP map has been updated, it is automatically distributed to all
+slave servers in the respective domain using the
+.Xr yppush 8
+utility.
+To disable automatic distribution, set the
+.Dv NOPUSH
+variable to an arbitrary, non-empty, value.
+.Sh STANDARD YP MAPS
+By default,
+.Nm
+provides the following
+.Xr make 1
+targets:
+.Bl -tag -width protocols
+.It Ic passwd
+Generates the
+.Pa passwd.byname ,
+.Pa passwd.byuid ,
+.Pa master.passwd.byname ,
+and
+.Pa master.passwd.byuid
+maps from
+.Xr master.passwd 5
+for use by
+.Xr getpwent 3 .
+.Pp
+The
+.Pa master.passwd.*\&
+maps always contain complete records in
+.Xr master.passwd 5
+format, including the encrypted passwords.
+.Pp
+The
+.Pa passwd.*\&
+maps follow the reduced
+.Xr passwd 5
+format having the class, change, and expire fields removed but by default
+the encrypted passwords are included too.
+If the
+.Dv UNSECURE
+variable is changed to be empty, the encrypted passwords are replaced by
+asterisks
+.Pq Ql \&* .
+.It Ic netgroup
+Generates the
+.Pa netgroup ,
+.Pa netgroup.byuser ,
+and
+.Pa netgroup.byhost
+maps from
+.Xr netgroup 5
+for use by
+.Xr getnetgrent 3
+and
+.Xr passwd 5 .
+Requires the
+.Xr revnetgroup 8
+utility.
+.It Ic group
+Generates the
+.Pa group.byname
+and
+.Pa group.bygid
+maps from
+.Xr group 5
+for use by
+.Xr getgrent 3 .
+.It Ic netid
+Generates the
+.Pa netid.byname
+map from
+.Xr netid 5 ,
+.Xr passwd 5 ,
+.Xr group 5 ,
+and
+.Xr hosts 5
+for use by
+.Xr getgrouplist 3 .
+Requires the
+.Xr mknetid 8
+utility.
+.It Ic hosts
+Generates the
+.Pa hosts.byname
+and
+.Pa hosts.byaddr
+maps from
+.Xr hosts 5
+for use by
+.Xr gethostbyname 3 .
+Requires the
+.Xr stdhosts 8
+utility.
+.Pp
+To get
+.Xr ypserv 8
+to ask DNS for unknown hosts, set the
+.Dv USEDNS
+variable to
+.Fl b .
+.It Ic ethers
+Generates the
+.Pa ethers.byaddr
+and
+.Pa ethers.byname
+maps from
+.Xr ethers 5
+for use by
+.Xr ethers 3 .
+Requires the
+.Xr stdethers 8
+utility.
+.It Ic networks
+Generates the
+.Pa networks.byname
+and
+.Pa networks.byaddr
+maps from
+.Xr networks 5
+for use by
+.Xr getnetent 3 .
+.It Ic rpc
+Generates the
+.Pa rpc.bynumber
+map from
+.Xr rpc 5
+for use by
+.Xr getrpcent 3 .
+.It Ic services
+Generates the
+.Pa services.byname
+map from
+.Xr services 5
+for use by
+.Xr getservent 3 .
+.It Ic protocols
+Generates the
+.Pa protocols.byname
+and
+.Pa protocols.bynumber
+maps from
+.Xr protocols 5
+for use by
+.Xr getprotoent 3 .
+.It Ic aliases
+Generates the
+.Pa mail.aliases
+and
+.Pa mail.byaddr
+maps from
+.Xr aliases 5 .
+This target uses both
+.Xr sendmail 8
+with the option
+.Fl bi
+and the
+.Xr mkalias 8
+utility.
+.It Ic amd.home
+Generates the
+.Pa amd.home
+map from the file
+.Pa /etc/amd/amd.home .
+.It Ic all
+Generates all of the above.
+.El
+.Pp
+In order to keep additional custom YP maps up to date, the
+.Pa Makefile
+should be extended to support additional targets.
+.Sh FILES
+.Bl -tag -width "/var/yp/domainname/ypservers.db" -compact
+.It /var/yp/Makefile
+Top level YP Makefile.
+.It /var/yp/ Ns Ar domainname Ns /Makefile
+Per domain YP maps Makefile.
+.It /var/yp/ Ns Ar domainname Ns /ypservers.db
+Database of hosts serving this domain.
+.It /var/yp/ Ns Ar domainname/mapname Ns .db
+Database files containing the YP maps.
+.It /var/yp/ Ns Ar domainname/target Ns .time
+Cookies controlling the operation of
+.Xr make 1 .
+.El
+.Sh SEE ALSO
+.Xr make 1 ,
+.Xr db 3 ,
+.Xr makedbm 8 ,
+.Xr yp 8 ,
+.Xr ypinit 8 ,
+.Xr yppush 8 ,
+.Xr ypserv 8
diff --git a/usr.sbin/ypserv/ypinit/ypinit.8 b/usr.sbin/ypserv/ypinit/ypinit.8
index cfacd65e550..bc538daf908 100644
--- a/usr.sbin/ypserv/ypinit/ypinit.8
+++ b/usr.sbin/ypserv/ypinit/ypinit.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ypinit.8,v 1.13 2008/06/01 18:38:29 sobrado Exp $
+.\" $OpenBSD: ypinit.8,v 1.14 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1997 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 1 2008 $
+.Dd $Mdocdate: October 22 2008 $
.Dt YPINIT 8
.Os
.Sh NAME
@@ -63,6 +63,7 @@ is not given the default domainname will be used.
.El
.Sh SEE ALSO
.Xr domainname 1 ,
+.Xr Makefile.yp 8 ,
.Xr yp 8 ,
.Xr ypserv 8
.Sh AUTHORS
diff --git a/usr.sbin/ypserv/yppush/yppush.8 b/usr.sbin/ypserv/yppush/yppush.8
index f2cc4a568ff..7b2b82f83cf 100644
--- a/usr.sbin/ypserv/yppush/yppush.8
+++ b/usr.sbin/ypserv/yppush/yppush.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: yppush.8,v 1.13 2008/06/01 21:45:08 sobrado Exp $
+.\" $OpenBSD: yppush.8,v 1.14 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 1 2008 $
+.Dd $Mdocdate: October 22 2008 $
.Dt YPPUSH 8
.Os
.Sh NAME
@@ -59,6 +59,7 @@ Verbose.
Announce what the program is doing.
.El
.Sh SEE ALSO
+.Xr Makefile.yp 8 ,
.Xr yp 8 ,
.Xr ypserv 8
.Sh AUTHORS
diff --git a/usr.sbin/ypserv/ypserv/ypserv.8 b/usr.sbin/ypserv/ypserv/ypserv.8
index ff0a465cb2a..25e2462d43f 100644
--- a/usr.sbin/ypserv/ypserv/ypserv.8
+++ b/usr.sbin/ypserv/ypserv/ypserv.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ypserv.8,v 1.24 2007/05/31 19:20:31 jmc Exp $
+.\" $OpenBSD: ypserv.8,v 1.25 2008/10/22 20:31:20 jmc Exp $
.\"
.\" Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 22 2008 $
.Dt YPSERV 8
.Os
.Sh NAME
@@ -134,6 +134,7 @@ or
.Sh SEE ALSO
.Xr securenet 5 ,
.Xr ypserv.acl 5 ,
+.Xr Makefile.yp 8 ,
.Xr yp 8 ,
.Xr ypbind 8
.Sh AUTHORS