1#- 2# SPDX-License-Identifier: BSD-2-Clause 3# 4# Copyright (c) 2021, 2023 The FreeBSD Foundation 5# Copyright (c) 2024 Mark Johnston <markj@FreeBSD.org> 6# 7# This software was developed by Mark Johnston under sponsorship from 8# the FreeBSD Foundation. 9# 10# This software was developed by Jake Freeland under sponsorship from 11# the FreeBSD Foundation. 12# 13 14# Tests to-do: 15# actions: users 16 17. $(atf_get_srcdir)/syslogd_test_common.sh 18 19atf_test_case "unix" "cleanup" 20unix_head() 21{ 22 atf_set descr "Messages are logged over UNIX transport" 23} 24unix_body() 25{ 26 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 27 syslogd_start 28 29 syslogd_log -p user.debug -t unix -h "${SYSLOGD_LOCAL_SOCKET}" \ 30 "hello, world (unix)" 31 syslogd_check_log "unix: hello, world \(unix\)" 32} 33unix_cleanup() 34{ 35 syslogd_stop 36} 37 38atf_test_case "inet" "cleanup" 39inet_head() 40{ 41 atf_set descr "Messages are logged over INET transport" 42} 43inet_body() 44{ 45 [ "$(sysctl -n kern.features.inet)" != "1" ] && 46 atf_skip "Kernel does not support INET" 47 48 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 49 syslogd_start 50 51 # We have INET transport; make sure we can use it. 52 syslogd_log -4 -p user.debug -t inet -h 127.0.0.1 -P "${SYSLOGD_UDP_PORT}" \ 53 "hello, world (v4)" 54 syslogd_check_log "inet: hello, world \(v4\)" 55} 56inet_cleanup() 57{ 58 syslogd_stop 59} 60 61atf_test_case "inet6" "cleanup" 62inet6_head() 63{ 64 atf_set descr "Messages are logged over INET6 transport" 65} 66inet6_body() 67{ 68 [ "$(sysctl -n kern.features.inet6)" != "1" ] && 69 atf_skip "Kernel does not support INET6" 70 71 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 72 syslogd_start 73 74 # We have INET6 transport; make sure we can use it. 75 syslogd_log -6 -p user.debug -t unix -h ::1 -P "${SYSLOGD_UDP_PORT}" \ 76 "hello, world (v6)" 77 syslogd_check_log "unix: hello, world \(v6\)" 78} 79inet6_cleanup() 80{ 81 syslogd_stop 82} 83 84atf_test_case "reload" "cleanup" 85reload_head() 86{ 87 atf_set descr "SIGHUP correctly refreshes configuration" 88} 89reload_body() 90{ 91 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 92 syslogd_start 93 94 syslogd_log -p user.debug -t reload -h "${SYSLOGD_LOCAL_SOCKET}" \ 95 "pre-reload" 96 syslogd_check_log "reload: pre-reload" 97 98 # Override the old rule. 99 printf "news.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 100 syslogd_reload 101 102 syslogd_log -p user.debug -t reload -h "${SYSLOGD_LOCAL_SOCKET}" \ 103 "post-reload user" 104 syslogd_log -p news.debug -t reload -h "${SYSLOGD_LOCAL_SOCKET}" \ 105 "post-reload news" 106 sleep 0.5 107 syslogd_check_log_nopoll "reload: post-reload news" 108 syslogd_check_log_nomatch "reload: post-reload user" 109} 110reload_cleanup() 111{ 112 syslogd_stop 113} 114 115atf_test_case "prog_filter" "cleanup" 116prog_filter_head() 117{ 118 atf_set descr "Messages are only received from programs in the filter" 119} 120prog_filter_body() 121{ 122 printf "!prog1,prog2\nuser.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 123 syslogd_start 124 125 syslogd_log -p user.debug -t "prog1" -h "${SYSLOGD_LOCAL_SOCKET}" \ 126 "hello this is prog1" 127 syslogd_check_log "prog1: hello this is prog1" 128 129 syslogd_log -p user.debug -t "prog2" -h "${SYSLOGD_LOCAL_SOCKET}" \ 130 "hello this is prog2" 131 syslogd_check_log "prog2: hello this is prog2" 132 133 syslogd_log -p user.debug -t "prog3" -h "${SYSLOGD_LOCAL_SOCKET}" \ 134 "hello this is prog3" 135 syslogd_check_log_nomatch "prog3: hello this is prog3" 136 137 # Override the old rule. 138 printf "!-prog1,prog2\nuser.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 139 syslogd_reload 140 141 syslogd_log -p user.debug -t "prog1" -h "${SYSLOGD_LOCAL_SOCKET}" \ 142 "hello this is prog1" 143 syslogd_check_log_nomatch "prog1: hello this is prog1" 144 145 syslogd_log -p user.debug -t "prog2" -h "${SYSLOGD_LOCAL_SOCKET}" \ 146 "hello this is prog2" 147 syslogd_check_log_nomatch "prog2: hello this is prog2" 148 149 syslogd_log -p user.debug -t "prog3" -h "${SYSLOGD_LOCAL_SOCKET}" \ 150 "hello this is prog3" 151 syslogd_check_log "prog3: hello this is prog3" 152} 153prog_filter_cleanup() 154{ 155 syslogd_stop 156} 157 158atf_test_case "host_filter" "cleanup" 159host_filter_head() 160{ 161 atf_set descr "Messages are only received from hostnames in the filter" 162} 163host_filter_body() 164{ 165 printf "+host1,host2\nuser.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 166 syslogd_start 167 168 syslogd_log -p user.debug -t "host1" -H "host1" \ 169 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host1" 170 syslogd_check_log "host1: hello this is host1" 171 syslogd_log -p user.debug -t "host2" -H "host2" \ 172 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host2" 173 syslogd_check_log "host2: hello this is host2" 174 syslogd_log -p user.debug -t "host3" -H "host3" \ 175 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host3" 176 syslogd_check_log_nomatch "host3: hello this is host3" 177 178 # Override the old rule. 179 printf "\-host1,host2\nuser.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 180 syslogd_reload 181 182 syslogd_log -p user.debug -t "host1" -H "host1" \ 183 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host1" 184 syslogd_check_log_nomatch "host1: hello this is host1" 185 syslogd_log -p user.debug -t "host2" -H "host2" \ 186 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host2" 187 syslogd_check_log_nomatch "host2: hello this is host2" 188 syslogd_log -p user.debug -t "host3" -H "host3" \ 189 -h "${SYSLOGD_LOCAL_SOCKET}" "hello this is host3" 190 syslogd_check_log "host3: hello this is host3" 191} 192host_filter_cleanup() 193{ 194 syslogd_stop 195} 196 197atf_test_case "prop_filter" "cleanup" 198prop_filter_head() 199{ 200 atf_set descr "Messages are received based on conditions in the propery based filter" 201} 202prop_filter_body() 203{ 204 printf ":msg,contains,\"FreeBSD\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 205 > "${SYSLOGD_CONFIG}" 206 syslogd_start 207 208 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "FreeBSD" 209 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "freebsd" 210 syslogd_check_log "prop1: FreeBSD" 211 syslogd_check_log_nomatch "prop2: freebsd" 212 213 printf ":msg,!contains,\"FreeBSD\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 214 > "${SYSLOGD_CONFIG}" 215 syslogd_reload 216 217 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "FreeBSD" 218 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "freebsd" 219 syslogd_check_log_nomatch "prop1: FreeBSD" 220 syslogd_check_log "prop2: freebsd" 221 222 printf ":msg,icase_contains,\"FreeBSD\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 223 > "${SYSLOGD_CONFIG}" 224 syslogd_reload 225 226 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "FreeBSD" 227 syslogd_check_log "prop1: FreeBSD" 228 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "freebsd" 229 syslogd_check_log "prop2: freebsd" 230 231 printf ":msg,!icase_contains,\"FreeBSD\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 232 > "${SYSLOGD_CONFIG}" 233 syslogd_reload 234 235 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "FreeBSD" 236 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "freebsd" 237 syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "Solaris" 238 syslogd_check_log_nomatch "prop1: FreeBSD" 239 syslogd_check_log_nomatch "prop2: freebsd" 240 syslogd_check_log "prop3: Solaris" 241 242 printf ":msg,ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 243 > "${SYSLOGD_CONFIG}" 244 syslogd_reload 245 246 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" 247 syslogd_check_log "prop1: substring1" 248 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" 249 syslogd_check_log "prop2: substring2" 250 syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" 251 syslogd_check_log_nomatch "prop3: substring3" 252 253 printf ":msg,!ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ 254 > "${SYSLOGD_CONFIG}" 255 syslogd_reload 256 257 syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" 258 syslogd_check_log_nomatch "prop1: substring1" 259 syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" 260 syslogd_check_log_nomatch "prop2: substring2" 261 syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" 262 syslogd_check_log "prop3: substring3" 263} 264prop_filter_cleanup() 265{ 266 syslogd_stop 267} 268 269atf_test_case "host_action" "cleanup" 270host_action_head() 271{ 272 atf_set descr "Sends a message to a specified host" 273} 274host_action_body() 275{ 276 local addr="192.0.2.100" 277 278 atf_check ifconfig lo1 create 279 atf_check ifconfig lo1 inet "${addr}/24" 280 atf_check ifconfig lo1 up 281 282 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 283 syslogd_start -b "${addr}" 284 285 printf "user.debug\t@${addr}\n" > "${SYSLOGD_CONFIG}.2" 286 syslogd_start \ 287 -f "${SYSLOGD_CONFIG}.2" \ 288 -P "${SYSLOGD_PIDFILE}.2" \ 289 -p "${SYSLOGD_LOCAL_SOCKET}.2" \ 290 -S "${SYSLOGD_LOCAL_PRIVSOCKET}.2" 291 292 syslogd_log -p user.debug -t "test" -h "${SYSLOGD_LOCAL_SOCKET}.2" \ 293 "message from syslogd2" 294 syslogd_check_log "test: message from syslogd2" 295} 296host_action_cleanup() 297{ 298 syslogd_stop 299 syslogd_stop \ 300 "${SYSLOGD_PIDFILE}.2" \ 301 "${SYSLOGD_LOCAL_SOCKET}.2" \ 302 "${SYSLOGD_LOCAL_PRIVSOCKET}.2" 303 atf_check ifconfig lo1 destroy 304} 305 306atf_test_case "pipe_action" "cleanup" 307pipe_action_head() 308{ 309 atf_set descr "The pipe action evaluates provided command in sh(1)" 310} 311pipe_action_body() 312{ 313 printf "\"While I'm digging in the tunnel, the elves will often come to me \ 314 with solutions to my problem.\"\n-Saymore Crey" > testfile 315 316 printf "!pipe\nuser.debug\t| sed -i '' -e 's/Saymore Crey/Seymour Cray/g' \ 317 testfile\n" > "${SYSLOGD_CONFIG}" 318 syslogd_start 319 320 syslogd_log -p user.debug -t "pipe" -h "${SYSLOGD_LOCAL_SOCKET}" \ 321 "fix spelling error" 322 sleep 0.5 323 atf_check -o match:"Seymour Cray" cat testfile 324} 325pipe_action_cleanup() 326{ 327 syslogd_stop 328} 329 330atf_test_case "pipe_action_reload" "cleanup" 331pipe_action_reload_head() 332{ 333 atf_set descr "Pipe processes terminate gracefully on reload" 334} 335pipe_action_reload_body() 336{ 337 local pipecmd="${PWD}/pipe_cmd.sh" 338 339 cat <<__EOF__ > "${pipecmd}" 340#!/bin/sh 341echo START > ${SYSLOGD_LOGFILE} 342while read msg; do 343 echo \${msg} >> ${SYSLOGD_LOGFILE} 344done 345echo END >> ${SYSLOGD_LOGFILE} 346exit 0 347__EOF__ 348 chmod +x "${pipecmd}" 349 350 printf "!pipe\nuser.debug\t| %s\n" "${pipecmd}" > "${SYSLOGD_CONFIG}" 351 syslogd_start 352 353 syslogd_log -p user.debug -t "pipe" -h "${SYSLOGD_LOCAL_SOCKET}" "MSG" 354 atf_check pkill -HUP -F "${1:-${SYSLOGD_PIDFILE}}" 355 sleep 0.1 356 syslogd_check_log_nopoll "END" 357} 358pipe_action_reload_cleanup() 359{ 360 syslogd_stop 361} 362 363atf_test_case "jail_noinet" "cleanup" 364jail_noinet_head() 365{ 366 atf_set descr "syslogd -ss can be run in a jail without INET support" 367 atf_set require.user root 368} 369jail_noinet_body() 370{ 371 syslogd_mkjail syslogd_noinet 372 373 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 374 syslogd_start -j syslogd_noinet -s -s 375 376 syslogd_log -p user.debug -t "test" -h "${SYSLOGD_LOCAL_SOCKET}" \ 377 "hello, world" 378 syslogd_check_log "test: hello, world" 379} 380jail_noinet_cleanup() 381{ 382 syslogd_cleanup 383} 384 385# Create a pair of jails, connected by an epair. The idea is to run syslogd in 386# one jail (syslogd_allowed_peer), listening on 169.254.0.1, and logger(1) can 387# send messages from the other jail (syslogd_client) using source addrs 388# 169.254.0.2 or 169.254.0.3. 389allowed_peer_test_setup() 390{ 391 syslogd_check_req epair 392 393 local epair 394 395 syslogd_mkjail syslogd_allowed_peer vnet 396 syslogd_mkjail syslogd_client vnet 397 398 atf_check -o save:epair ifconfig epair create 399 epair=$(cat epair) 400 epair=${epair%%a} 401 402 atf_check ifconfig ${epair}a vnet syslogd_allowed_peer 403 atf_check ifconfig ${epair}b vnet syslogd_client 404 atf_check jexec syslogd_allowed_peer ifconfig ${epair}a inet 169.254.0.1/16 405 atf_check jexec syslogd_client ifconfig ${epair}b inet 169.254.0.2/16 406 atf_check jexec syslogd_client ifconfig ${epair}b alias 169.254.0.3/16 407} 408 409allowed_peer_test_cleanup() 410{ 411 syslogd_cleanup 412} 413 414atf_test_case allowed_peer "cleanup" 415allowed_peer_head() 416{ 417 atf_set descr "syslogd -a works" 418 atf_set require.user root 419} 420allowed_peer_body() 421{ 422 allowed_peer_test_setup 423 424 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 425 syslogd_start -j syslogd_allowed_peer -b 169.254.0.1:514 -a '169.254.0.2/32' 426 427 # Make sure that a message from 169.254.0.2:514 is logged. 428 syslogd_log_jail syslogd_client \ 429 -p user.debug -t test1 -h 169.254.0.1 -S 169.254.0.2:514 "hello, world" 430 syslogd_check_log "test1: hello, world" 431 432 # ... but not a message from port 515. 433 syslogd_log_jail syslogd_client \ 434 -p user.debug -t test2 -h 169.254.0.1 -S 169.254.0.2:515 "hello, world" 435 sleep 0.5 436 syslogd_check_log_nomatch "test2: hello, world" 437 syslogd_log_jail syslogd_client \ 438 -p user.debug -t test2 -h 169.254.0.1 -S 169.254.0.3:515 "hello, world" 439 sleep 0.5 440 syslogd_check_log_nomatch "test2: hello, world" 441 442 syslogd_stop 443 444 # Now make sure that we can filter by port. 445 syslogd_start -j syslogd_allowed_peer -b 169.254.0.1:514 -a '169.254.0.2/32:515' 446 447 syslogd_log_jail syslogd_client \ 448 -p user.debug -t test3 -h 169.254.0.1 -S 169.254.0.2:514 "hello, world" 449 syslogd_check_log_nomatch "test3: hello, world" 450 syslogd_log_jail syslogd_client \ 451 -p user.debug -t test4 -h 169.254.0.1 -S 169.254.0.2:515 "hello, world" 452 syslogd_check_log "test4: hello, world" 453 454 syslogd_stop 455} 456allowed_peer_cleanup() 457{ 458 allowed_peer_test_cleanup 459} 460 461atf_test_case allowed_peer_forwarding "cleanup" 462allowed_peer_forwarding_head() 463{ 464 atf_set descr "syslogd forwards messages from its listening port" 465 atf_set require.user root 466} 467allowed_peer_forwarding_body() 468{ 469 allowed_peer_test_setup 470 471 printf "user.debug\t@169.254.0.1\n" > client_config 472 printf "mark.debug\t@169.254.0.1:515\n" >> client_config 473 syslogd_start -j syslogd_client -b 169.254.0.2:514 -f ${PWD}/client_config 474 475 printf "+169.254.0.2\nuser.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 476 syslogd_start -j syslogd_allowed_peer -P ${SYSLOGD_PIDFILE}.2 \ 477 -b 169.254.0.1:514 -a 169.254.0.2/32 -p ${PWD}/peer 478 479 # A message forwarded to 169.254.0.1:514 should be logged, but one 480 # forwarded to 169.254.0.1:515 should not. 481 syslogd_log_jail syslogd_client \ 482 -h 169.254.0.2 -p user.debug -t test1 "hello, world" 483 syslogd_log_jail syslogd_client \ 484 -h 169.254.0.2 -p mark.debug -t test2 "hello, world" 485 486 syslogd_check_log "test1: hello, world" 487 syslogd_check_log_nomatch "test2: hello, world" 488} 489allowed_peer_forwarding_cleanup() 490{ 491 allowed_peer_test_cleanup 492} 493 494atf_test_case allowed_peer_wildcard "cleanup" 495allowed_peer_wildcard_head() 496{ 497 atf_set descr "syslogd -a works with port wildcards" 498 atf_set require.user root 499} 500allowed_peer_wildcard_body() 501{ 502 allowed_peer_test_setup 503 504 printf "user.debug\t${SYSLOGD_LOGFILE}\n" > "${SYSLOGD_CONFIG}" 505 syslogd_start -j syslogd_allowed_peer -b 169.254.0.1:514 -a '169.254.0.2/32:*' 506 507 # Make sure that a message from 169.254.0.2:514 is logged. 508 syslogd_log_jail syslogd_client \ 509 -p user.debug -t test1 -h 169.254.0.1 -S 169.254.0.2:514 "hello, world" 510 syslogd_check_log "test1: hello, world" 511 512 # ... as is a message from 169.254.0.2:515, allowed by the wildcard. 513 syslogd_log_jail syslogd_client \ 514 -p user.debug -t test2 -h 169.254.0.1 -S 169.254.0.2:515 "hello, world" 515 syslogd_check_log "test2: hello, world" 516 517 # ... but not a message from 169.254.0.3. 518 syslogd_log_jail syslogd_client \ 519 -p user.debug -t test3 -h 169.254.0.1 -S 169.254.0.3:514 "hello, world" 520 syslogd_check_log_nomatch "test3: hello, world" 521 syslogd_log_jail syslogd_client \ 522 -p user.debug -t test3 -h 169.254.0.1 -S 169.254.0.3:515 "hello, world" 523 syslogd_check_log_nomatch "test3: hello, world" 524 525 syslogd_stop 526} 527allowed_peer_wildcard_cleanup() 528{ 529 allowed_peer_test_cleanup 530} 531 532atf_test_case "forward" "cleanup" 533forward_head() 534{ 535 atf_set descr "syslogd forwards messages to a remote host" 536 atf_set require.user root 537} 538forward_body() 539{ 540 local epair 541 542 syslogd_check_req epair 543 544 atf_check -o save:epair ifconfig epair create 545 epair=$(cat epair) 546 epair=${epair%%a} 547 548 syslogd_mkjail syslogd_server vnet 549 atf_check ifconfig ${epair}a vnet syslogd_server 550 atf_check jexec syslogd_server ifconfig ${epair}a inet 169.254.0.1/16 551 atf_check jexec syslogd_server ifconfig ${epair}a alias 169.254.0.2/16 552 553 syslogd_mkjail syslogd_client vnet 554 atf_check ifconfig ${epair}b vnet syslogd_client 555 atf_check jexec syslogd_client ifconfig ${epair}b inet 169.254.0.3/16 556 557 cat <<__EOF__ > ./client_config 558user.debug @169.254.0.1 559mail.debug @169.254.0.2 560ftp.debug @169.254.0.1 561__EOF__ 562 563 cat <<__EOF__ > ./server_config 564user.debug ${SYSLOGD_LOGFILE} 565mail.debug ${SYSLOGD_LOGFILE} 566ftp.debug ${SYSLOGD_LOGFILE} 567__EOF__ 568 569 syslogd_start -j syslogd_server -f ${PWD}/server_config \ 570 -b 169.254.0.1 -b 169.254.0.2 571 syslogd_start -j syslogd_client -f ${PWD}/client_config \ 572 -p ${PWD}/client -P ${SYSLOGD_PIDFILE}.2 573 574 syslogd_log_jail syslogd_client \ 575 -h 169.254.0.3 -P $SYSLOGD_UDP_PORT -p user.debug -t test1 "hello, world" 576 syslogd_check_log "test1: hello, world" 577 578 syslogd_log_jail syslogd_client \ 579 -h 169.254.0.3 -P $SYSLOGD_UDP_PORT -p mail.debug -t test2 "you've got mail" 580 syslogd_check_log "test2: you've got mail" 581 582 syslogd_log_jail syslogd_client \ 583 -h 169.254.0.3 -P $SYSLOGD_UDP_PORT -p ftp.debug -t test3 "transfer complete" 584 syslogd_check_log "test3: transfer complete" 585} 586forward_cleanup() 587{ 588 syslogd_cleanup 589} 590 591atf_init_test_cases() 592{ 593 atf_add_test_case "unix" 594 atf_add_test_case "inet" 595 atf_add_test_case "inet6" 596 atf_add_test_case "reload" 597 atf_add_test_case "prog_filter" 598 atf_add_test_case "host_filter" 599 atf_add_test_case "prop_filter" 600 atf_add_test_case "host_action" 601 atf_add_test_case "pipe_action" 602 atf_add_test_case "pipe_action_reload" 603 atf_add_test_case "jail_noinet" 604 atf_add_test_case "allowed_peer" 605 atf_add_test_case "allowed_peer_forwarding" 606 atf_add_test_case "allowed_peer_wildcard" 607 atf_add_test_case "forward" 608} 609