summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-09-20 12:51:44 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-09-20 12:51:44 +0000
commitee967bb279f78037ebc496177469bc4f5a82b2e3 (patch)
treeb2f6a7a29330bdaea99ae2b2ffcc2632ccdb4593
parent9759a4bd398b4827fe9a4abb3c00fda6e5972413 (diff)
Enable npppd and npppctl in default build. Add npppd to rc and
install sample configs to /etc/. ok claudio deraadt henning mcbride
-rw-r--r--etc/Makefile15
-rw-r--r--etc/changelist4
-rw-r--r--etc/mtree/4.4BSD.dist7
-rw-r--r--etc/rc4
-rw-r--r--etc/rc.conf3
-rw-r--r--etc/rc.d/npppd11
-rw-r--r--etc/sysctl.conf3
-rw-r--r--usr.sbin/Makefile19
-rw-r--r--usr.sbin/npppd/Makefile10
-rw-r--r--usr.sbin/npppd/npppd/npppd-users9
-rw-r--r--usr.sbin/npppd/npppd/npppd.conf36
11 files changed, 97 insertions, 24 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 856c6771d7f..ec773d9e89a 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.323 2012/08/29 04:04:15 dtucker Exp $
+# $OpenBSD: Makefile,v 1.324 2012/09/20 12:51:43 yasuoka Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -50,12 +50,12 @@ BIN2= motd
# -r-xr-xr-x
RCDAEMONS= amd apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd \
ftpd ftpproxy hostapd hotplugd httpd identd ifstated iked \
- inetd isakmpd ldapd ldattach ldpd lpd mopd mrouted named nginx \
- nsd ntpd ospfd ospf6d portmap pflogd rarpd rbootd relayd ripd \
- route6d rtadvd rtsold rwhod sasyncd sendmail sensorsd smtpd \
- snmpd spamd sshd syslogd watchdogd wsmoused xdm ypbind ypldap \
- yppasswdd ypserv kdc kadmind kpasswdd nfsd mountd lockd statd \
- spamlogd sndiod popa3d tftpd tftpproxy
+ inetd isakmpd ldapd npppd ldattach ldpd lpd mopd mrouted \
+ named nginx nsd ntpd ospfd ospf6d portmap pflogd rarpd rbootd \
+ relayd ripd route6d rtadvd rtsold rwhod sasyncd sendmail \
+ sensorsd smtpd snmpd spamd sshd syslogd watchdogd wsmoused \
+ xdm ypbind ypldap yppasswdd ypserv kdc kadmind kpasswdd nfsd \
+ mountd lockd statd spamlogd sndiod popa3d tftpd tftpproxy
MISETS= base${OSrev}.tgz comp${OSrev}.tgz \
man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz
@@ -260,6 +260,7 @@ distribution-etc-root-var: distrib-dirs
cd ../usr.bin/mail && exec ${MAKE} distribution
cd ../usr.sbin/ldapd && exec ${MAKE} distribution
cd ../usr.sbin/nginx && exec ${MAKE} -f Makefile.bsd-wrapper distribution
+ cd ../usr.sbin/npppd && exec ${MAKE} distribution
cd mail && exec ${MAKE} distribution
${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
${DESTDIR}/var/mail/root
diff --git a/etc/changelist b/etc/changelist
index e5c1bb83233..250b9b5511f 100644
--- a/etc/changelist
+++ b/etc/changelist
@@ -1,4 +1,4 @@
-# $OpenBSD: changelist,v 1.75 2011/10/06 20:49:25 deraadt Exp $
+# $OpenBSD: changelist,v 1.76 2012/09/20 12:51:43 yasuoka Exp $
#
# List of files which the security script backs up and checks
# for modifications.
@@ -93,6 +93,8 @@
/etc/netstart
/etc/networks
/etc/newsyslog.conf
+/etc/npppd/npppd.conf
++/etc/npppd/npppd-users
/etc/nsd.conf
/etc/ntpd.conf
/etc/ospf6d.conf
diff --git a/etc/mtree/4.4BSD.dist b/etc/mtree/4.4BSD.dist
index 3b1cb2d19d0..6c19f68993f 100644
--- a/etc/mtree/4.4BSD.dist
+++ b/etc/mtree/4.4BSD.dist
@@ -1,4 +1,4 @@
-# $OpenBSD: 4.4BSD.dist,v 1.226 2012/08/23 07:09:41 deraadt Exp $
+# $OpenBSD: 4.4BSD.dist,v 1.227 2012/09/20 12:51:43 yasuoka Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
@@ -188,6 +188,11 @@ nginx
# ./etc/nginx
..
+# ./etc/npppd
+npppd
+# ./etc/npppd
+..
+
# ./etc/ppp
ppp
# ./etc/ppp
diff --git a/etc/rc b/etc/rc
index 52587be9502..5e2da49b33b 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.402 2012/08/26 19:25:19 ajacoutot Exp $
+# $OpenBSD: rc,v 1.403 2012/09/20 12:51:43 yasuoka Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -387,7 +387,7 @@ make_keys
echo -n 'starting early daemons:'
start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd
-start_daemon ldapd
+start_daemon ldapd npppd
echo '.'
if [ X"${ipsec}" != X"NO" ]; then
diff --git a/etc/rc.conf b/etc/rc.conf
index 7c080e0bc76..8a0a3fd1f5a 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: rc.conf,v 1.170 2012/08/26 19:25:19 ajacoutot Exp $
+# $OpenBSD: rc.conf,v 1.171 2012/09/20 12:51:43 yasuoka Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
ldpd_flags=NO # for normal use: ""
@@ -46,6 +46,7 @@ snmpd_flags=NO # for normal use: ""
smtpd_flags=NO # for normal use: ""
sndiod_flags="" # for normal use: ""
ldapd_flags=NO # for normal use: ""
+npppd_flags=NO # for normal use: ""
inetd_flags="" # for normal use: ""
rwhod_flags=NO # for normal use: ""
portmap_flags=NO # for normal use: ""
diff --git a/etc/rc.d/npppd b/etc/rc.d/npppd
new file mode 100644
index 00000000000..fb8ffd1d344
--- /dev/null
+++ b/etc/rc.d/npppd
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD: npppd,v 1.1 2012/09/20 12:51:43 yasuoka Exp $
+
+daemon="/usr/sbin/npppd"
+
+. /etc/rc.d/rc.subr
+
+pexp="npppd: main"
+
+rc_cmd $1
diff --git a/etc/sysctl.conf b/etc/sysctl.conf
index fdf18bc1fb9..3de590aa0c0 100644
--- a/etc/sysctl.conf
+++ b/etc/sysctl.conf
@@ -1,4 +1,4 @@
-# $OpenBSD: sysctl.conf,v 1.53 2012/05/31 15:04:03 sthen Exp $
+# $OpenBSD: sysctl.conf,v 1.54 2012/09/20 12:51:43 yasuoka Exp $
#
# This file contains a list of sysctl options the user wants set at
# boot time. See sysctl(3) and sysctl(8) for more information on
@@ -25,6 +25,7 @@
#net.inet.tcp.ecn=1 # 1=Enable the TCP ECN extension
#net.inet.carp.preempt=1 # 1=Enable carp(4) preemption
#net.inet.carp.log=3 # log level of carp(4) info, default 2
+#net.pipex.enable=1 # 1=Enable pipex(4) for npppd(8)
#ddb.panic=0 # 0=Do not drop into ddb on a kernel panic
#ddb.console=1 # 1=Permit entry of ddb from the console
#fs.posix.setuid=0 # 0=Traditional BSD chown() semantics
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 5f34efc20b0..afc18aa4b1a 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.163 2012/08/23 06:21:46 deraadt Exp $
+# $OpenBSD: Makefile,v 1.164 2012/09/20 12:51:43 yasuoka Exp $
.include <bsd.own.mk>
@@ -9,14 +9,15 @@ SUBDIR= ac accton acpidump adduser amd apm apmd arp \
inetd iostat iscsictl iscsid \
kgmon kvm_mkdb ldapd ldapctl ldpd ldpctl lpr mailwrapper map-mbone \
memconfig mksuncd mopd mrinfo mrouted mtrace mtree ndp netgroup_mkdb \
- nginx nsd ntpd openssl ospfctl ospfd ospf6d ospf6ctl pcidump pkg_add \
- popa3d portmap ppp pppd pppoe procmap pstat pwd_mkdb quot quotaon \
- rarpd rbootd rdate relayctl relayd repquota rip6query ripctl ripd \
- rmt route6d rpc.bootparamd rpc.lockd rpc.statd rtadvd rtsold rwhod \
- sa sasyncd sensorsd sliplogin slstats smtpd snmpctl snmpd spamdb \
- spray syslogc syslogd sysmerge tcpdrop tcpdump tftp-proxy tftpd \
- tokenadm tokeninit traceroute traceroute6 trpt usbdevs user vipw \
- watchdogd wsconscfg wsfontload wsmoused zdump zic ztsscale
+ nginx npppctl npppd nsd ntpd openssl ospfctl ospfd ospf6d ospf6ctl \
+ pcidump pkg_add popa3d portmap ppp pppd pppoe procmap pstat pwd_mkdb \
+ quot quotaon rarpd rbootd rdate relayctl relayd repquota rip6query \
+ ripctl ripd rmt route6d rpc.bootparamd rpc.lockd rpc.statd rtadvd \
+ rtsold rwhod sa sasyncd sensorsd sliplogin slstats smtpd snmpctl \
+ snmpd spamdb spray syslogc syslogd sysmerge tcpdrop tcpdump \
+ tftp-proxy tftpd tokenadm tokeninit traceroute traceroute6 trpt \
+ usbdevs user vipw watchdogd wsconscfg wsfontload wsmoused zdump zic \
+ ztsscale
.if (${YP:L} == "yes")
SUBDIR+=ypbind ypldap yppoll ypset ypserv
diff --git a/usr.sbin/npppd/Makefile b/usr.sbin/npppd/Makefile
index 578905cd7e7..c310e6d6768 100644
--- a/usr.sbin/npppd/Makefile
+++ b/usr.sbin/npppd/Makefile
@@ -1,8 +1,14 @@
-# $OpenBSD: Makefile,v 1.4 2012/05/08 13:15:11 yasuoka Exp $
+# $OpenBSD: Makefile,v 1.5 2012/09/20 12:51:43 yasuoka Exp $
#
-# $Id: Makefile,v 1.4 2012/05/08 13:15:11 yasuoka Exp $
+# $Id: Makefile,v 1.5 2012/09/20 12:51:43 yasuoka Exp $
#
SUBDIR+= npppd
+distribution:
+ ${INSTALL} -C -o root -g wheel -m 0644 ${.CURDIR}/npppd/npppd.conf \
+ ${DESTDIR}/etc/npppd/npppd.conf
+ ${INSTALL} -C -o root -g wheel -m 0600 ${.CURDIR}/npppd/npppd-users \
+ ${DESTDIR}/etc/npppd/npppd-users
+
.include <bsd.subdir.mk>
diff --git a/usr.sbin/npppd/npppd/npppd-users b/usr.sbin/npppd/npppd/npppd-users
new file mode 100644
index 00000000000..260bd66ba7b
--- /dev/null
+++ b/usr.sbin/npppd/npppd/npppd-users
@@ -0,0 +1,9 @@
+# $OpenBSD: npppd-users,v 1.1 2012/09/20 12:51:43 yasuoka Exp $
+# sample npppd-users file. see npppd-users(5)
+
+#taro:\
+# :password=taro's password:\
+# :framed-ip-address=10.0.0.101:
+#hana:\
+# :password=hana's password:\
+# :framed-ip-address=10.0.0.102:
diff --git a/usr.sbin/npppd/npppd/npppd.conf b/usr.sbin/npppd/npppd/npppd.conf
new file mode 100644
index 00000000000..a08b6e3a1d3
--- /dev/null
+++ b/usr.sbin/npppd/npppd/npppd.conf
@@ -0,0 +1,36 @@
+# $OpenBSD: npppd.conf,v 1.1 2012/09/20 12:51:43 yasuoka Exp $
+# sample npppd configuration file. see npppd.conf(5)
+
+authentication LOCAL type local {
+ users-file "/etc/npppd/npppd-users"
+}
+#authentication RADIUS type radius {
+# authentication-server {
+# address 192.168.0.1 secret "hogehoge"
+# }
+# accounting-server {
+# address 192.168.0.1 secret "hogehoge"
+# }
+#}
+
+tunnel L2TP_ipv4 protocol l2tp {
+ listen on 0.0.0.0
+}
+tunnel L2TP_ipv6 protocol l2tp {
+ listen on ::
+}
+
+ipcp IPCP {
+ pool-address 10.0.0.2-10.0.0.254
+ dns-servers 8.8.8.8
+}
+
+# use pppx(4) interface. use an interface per a ppp session.
+interface pppx0 address 10.0.0.1 ipcp IPCP
+bind tunnel from L2TP_ipv4 authenticated by LOCAL to pppx0
+bind tunnel from L2TP_ipv6 authenticated by LOCAL to pppx0
+
+# use tun(4) interface. multiple ppp sessions concentrate one interface.
+#interface tun0 address 10.0.0.1 ipcp IPCP
+#bind tunnel from L2TP_ipv4 authenticated by LOCAL to tun0
+#bind tunnel from L2TP_ipv6 authenticated by LOCAL to tun0