/usr/share/augeas/lenses/dist/tests/test_inetd.aug is in augeas-lenses 1.2.0-0ubuntu1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | module Test_inetd =
(* The standard "parse a bucket of text" test *)
let conf = "# Blah di blah comment
simplesrv stream tcp nowait fred /usr/bin/simplesrv
arguserve dgram udp wait mary /usr/bin/usenet foo bar wombat
1234 stream tcp nowait fred /usr/bin/numbersrv
127.0.0.1:addrsrv stream tcp nowait fred /usr/bin/addrsrv
127.0.0.1,10.0.0.1:multiaddrsrv stream tcp nowait fred /usr/bin/multiaddrsrv
faff.fred.com:
127.0.0.1,faff.fred.com:
*:
[::1]:addrsrv stream tcp nowait fred /usr/bin/addrsrv
sndbufsrv stream tcp,sndbuf=12k nowait fred /usr/bin/sndbufsrv
rcvbufsrv stream tcp,rcvbuf=24k nowait fred /usr/bin/rcvbufsrv
allbufsrv stream tcp,sndbuf=1m,rcvbuf=24k nowait fred /usr/bin/allbufsrv
dotgroupsrv stream tcp nowait fred.wilma /usr/bin/dotgroupsrv
colongroupsrv stream tcp nowait fred:wilma /usr/bin/colongroupsrv
maxsrv stream tcp nowait.20 fred /usr/bin/maxsrv
dummy/1 tli rpc/circuit_v,udp wait root /tmp/test_svc test_svc
"
test Inetd.lns get conf =
{ "#comment" = "Blah di blah comment" }
{}
{ "service" = "simplesrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/simplesrv" }
}
{ "service" = "arguserve"
{ "socket" = "dgram" }
{ "protocol" = "udp" }
{ "wait" = "wait" }
{ "user" = "mary" }
{ "command" = "/usr/bin/usenet" }
{ "arguments"
{ "1" = "foo" }
{ "2" = "bar" }
{ "3" = "wombat" }
}
}
{}
{ "service" = "1234"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/numbersrv" }
}
{}
{ "service" = "addrsrv"
{ "address"
{ "1" = "127.0.0.1" }
}
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/addrsrv" }
}
{ "service" = "multiaddrsrv"
{ "address"
{ "1" = "127.0.0.1" }
{ "2" = "10.0.0.1" }
}
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/multiaddrsrv" }
}
{ "address"
{ "1" = "faff.fred.com" }
}
{ "address"
{ "1" = "127.0.0.1" }
{ "2" = "faff.fred.com" }
}
{ "address"
{ "1" = "*" }
}
{ "service" = "addrsrv"
{ "address"
{ "1" = "[::1]" }
}
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/addrsrv" }
}
{}
{ "service" = "sndbufsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "sndbuf" = "12k" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/sndbufsrv" }
}
{ "service" = "rcvbufsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "rcvbuf" = "24k" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/rcvbufsrv" }
}
{ "service" = "allbufsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "sndbuf" = "1m" }
{ "rcvbuf" = "24k" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "command" = "/usr/bin/allbufsrv" }
}
{}
{ "service" = "dotgroupsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "group" = "wilma" }
{ "command" = "/usr/bin/dotgroupsrv" }
}
{ "service" = "colongroupsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "user" = "fred" }
{ "group" = "wilma" }
{ "command" = "/usr/bin/colongroupsrv" }
}
{}
{ "service" = "maxsrv"
{ "socket" = "stream" }
{ "protocol" = "tcp" }
{ "wait" = "nowait" }
{ "max" = "20" }
{ "user" = "fred" }
{ "command" = "/usr/bin/maxsrv" }
}
{}
{ "rpc_service" = "dummy"
{ "version" = "1" }
{ "endpoint-type" = "tli" }
{ "protocol" = "circuit_v" }
{ "protocol" = "udp" }
{ "wait" = "wait" }
{ "user" = "root" }
{ "command" = "/tmp/test_svc" }
{ "arguments"
{ "1" = "test_svc" } }
}
(**************************************************************************)
(* Test new file creation *)
test Inetd.lns put "" after
set "/service" "faffsrv";
set "/service/socket" "stream";
set "/service/protocol" "tcp";
set "/service/wait" "nowait";
set "/service/user" "george";
set "/service/command" "/sbin/faffsrv"
= "faffsrv stream tcp nowait george /sbin/faffsrv\n"
|