Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Don't depends on system configurations
Browse files Browse the repository at this point in the history
Copy from Ubuntu 12.04 LTS to tests/data/
  • Loading branch information
Gasol committed Feb 24, 2014
1 parent 33e9aab commit 233435a
Show file tree
Hide file tree
Showing 8 changed files with 741 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ sudo apt-get update
sudo debconf-set-selections <<< 'nis nis/domain string precise32'
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y expect php5-cli php5-dev nis valgrind
sudo sed -i'' -re 's/NISSERVER=(.*)/NISSERVER=true/' /etc/default/nis
sudo sed -i'' -re 's|(YPSRCDIR = ).*|\1/vagrant/tests/data|' /var/yp/Makefile
sudo sed -i'' -re 's|(YPPWDDIR = ).*|\1/vagrant/tests/data|' /var/yp/Makefile
sudo service ypserv start
sudo expect -c '
spawn /usr/lib/yp/ypinit -m
expect "<control D>"
send "precise32"
send "precise32\n"
send ""
expect "Is this correct?"
send "\n"
expect eof
Expand Down
3 changes: 3 additions & 0 deletions tests/data/group
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vagrant:x:1000:
puppet:x:1001:
vboxsf:x:1002:
2 changes: 2 additions & 0 deletions tests/data/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
127.0.0.1 localhost
127.0.1.1 precise32
22 changes: 22 additions & 0 deletions tests/data/netgroup
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# netgroup The netgroup file. Entries look like this:
#
# netgroup (host,user,domain) (host,user,domain) ..
#
# So for example a netgroup for powerusers could be:
#
# powerusers (,miquels,) (,torvalds,) (,fubar,)
#
# And an entry in the password file like
#
# +@powerusers::::::
# +:*:::::/etc/NoShell
#
# would give access only to the users in "powerusers", while the
# other users would be known to the system but have an invalid
# shell AND an invalid password (with Linux, you can also
# override the password field).
#

# powerusers (,miquels,) (,torvalds,) (,fubar,)
# ourhosts (picard,,) (enterprise,,) (laforge,,) (Q,,)
1 change: 1 addition & 0 deletions tests/data/passwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vagrant:x:1000:1000:vagrant,,,:/home/vagrant:/bin/bash
64 changes: 64 additions & 0 deletions tests/data/protocols
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Internet (IP) protocols
#
# Updated from http://www.iana.org/assignments/protocol-numbers and other
# sources.
# New protocols will be added on request if they have been officially
# assigned by IANA and are not historical.
# If you need a huge list of used numbers please install the nmap package.

ip 0 IP # internet protocol, pseudo protocol number
#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # Internet Group Management
ggp 3 GGP # gateway-gateway protocol
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
st 5 ST # ST datagram mode
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
igp 9 IGP # any private interior gateway (Cisco)
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340]
xtp 36 XTP # Xpress Transfer Protocol
ddp 37 DDP # Datagram Delivery Protocol
idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
ipv6 41 IPv6 # Internet Protocol, version 6
ipv6-route 43 IPv6-Route # Routing Header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
idrp 45 IDRP # Inter-Domain Routing Protocol
rsvp 46 RSVP # Reservation Protocol
gre 47 GRE # General Routing Encapsulation
esp 50 IPSEC-ESP # Encap Security Payload [RFC2406]
ah 51 IPSEC-AH # Authentication Header [RFC2402]
skip 57 SKIP # SKIP
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
vmtp 81 VMTP # Versatile Message Transport
eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
ospf 89 OSPFIGP # Open Shortest Path First IGP
ax.25 93 AX.25 # AX.25 frames
ipip 94 IPIP # IP-within-IP Encapsulation Protocol
etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
# 99 # any private encryption scheme
pim 103 PIM # Protocol Independent Multicast
ipcomp 108 IPCOMP # IP Payload Compression Protocol
vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798]
l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
isis 124 ISIS # IS-IS over IPv4
sctp 132 SCTP # Stream Control Transmission Protocol
fc 133 FC # Fibre Channel
mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775]
udplite 136 UDPLite # UDP-Lite [RFC3828]
mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023]
manet 138 # MANET Protocols [RFC5498]
hip 139 HIP # Host Identity Protocol
shim6 140 Shim6 # Shim6 Protocol [RFC5533]
wesp 141 WESP # Wrapped Encapsulating Security Payload
rohc 142 ROHC # Robust Header Compression
40 changes: 40 additions & 0 deletions tests/data/rpc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file contains user readable names that can be used in place of rpc
# program numbers.

portmapper 100000 portmap sunrpc
rstatd 100001 rstat rstat_svc rup perfmeter
rusersd 100002 rusers
nfs 100003 nfsprog
ypserv 100004 ypprog
mountd 100005 mount showmount
ypbind 100007
walld 100008 rwall shutdown
yppasswdd 100009 yppasswd
etherstatd 100010 etherstat
rquotad 100011 rquotaprog quota rquota
sprayd 100012 spray
3270_mapper 100013
rje_mapper 100014
selection_svc 100015 selnsvc
database_svc 100016
rexd 100017 rex
alis 100018
sched 100019
llockmgr 100020
nlockmgr 100021
x25.inr 100022
statmon 100023
status 100024
bootparam 100026
ypupdated 100028 ypupdate
keyserv 100029 keyserver
tfsd 100037
nsed 100038
nsemntd 100039
ypxfrd 100069
pcnfsd 150001
amd 300019 amq
sgi_fam 391002
ugidd 545580417
fypxfrd 600100069 freebsd-ypxfrd
bwnfsd 788585389
Loading

0 comments on commit 233435a

Please sign in to comment.