3 # pmlc/pmlogger access control compatibility
5 # Copyright (c) 2014 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 status
=1 # failure is the default!
17 $sudo rm -rf $tmp.
* $seq.full
18 trap "cd $here; $sudo rm -rf $tmp.*; exit \$status" 0 1 2 3 15
25 -e "s/^connect $pid/connect QA_LOGGER_PID/" \
26 -e "s/^pmlogger \[$pid]/pmlogger [QA_LOGGER_PID]/" \
27 -e "s/from host $hostname/from host HOST/" \
28 -e "s/\(The following pmloggers .* on \)$hostname/\1HOST/" \
29 -e '/primary (/s/([0-9][0-9]*).*/(LOGGER_PID) .../' \
30 -e '/^PMCD host/s/\( *\).*/\1HOST/' \
31 -e 's/^\(log started *\).*/\1DATESTAMP/' \
32 -e 's/^\(last log entry *\).*/\1DATESTAMP/' \
33 -e '/^current time/s/\( *\).*/\1DATE/' \
34 -e '/^log volume/s/\( *\).*/\1NUMBER/' \
35 -e '/^log size/s/\( *\).*/\1NUMBER/' \
39 # real QA test starts here
40 for acl
in enquire advisory mandatory \
41 'enquire,advisory' 'enquire,mandatory' 'advisory,mandatory' \
42 'enquire,advisory,mandatory'
44 echo |
tee -a $seq.full
45 echo "=== allow * : $acl ===" |
tee -a $seq.full
46 cat <<End-of-File >$tmp.config
47 log mandatory on once { sample.bin }
51 allow localhost : $acl;
54 $sudo rm -f $tmp.
[0-9]* $tmp.index
$tmp.meta
$tmp.log
55 # Note: _start_up_pmlogger returns with $pid set
57 _start_up_pmlogger
-L -c $tmp.config
-l $tmp.log
$tmp
58 _wait_for_pmlogger
$pid $tmp.log
60 cat <<End-of-File | pmlc -e 2>&1 | tee -a $seq.full | _filter
64 query { sample.colour sample.long.one }
68 log advisory on 5sec sample.long.one
69 log mandatory off sample.colour
71 cat <<End-of-File | pmlc -e 2>&1 | tee -a $seq.full | _filter
74 query { sample.colour sample.long.one }
78 cat $tmp.log
>>$seq.full