3 # Check parsing of PMCD access section user/group extensions with errors
5 # Copyright (c) 2013 Red Hat.
6 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
15 $unix_domain_sockets || _notrun
"No unix domain socket support available"
17 status
=1 # failure is the default!
18 $sudo rm -rf $tmp.
* $seq.full
19 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
25 -e "s:$userid $username:USERID USERNAME:g" \
26 -e "s:$groupid $groupname:GROUPID GROUPNAME:g" \
27 -e "s:$userid\($username\):USERID(USERNAME):g" \
28 -e "s:$groupid\($groupname\):GROUPID(GROUPNAME):g" \
32 # new access control cases, not checked in QA 051 or 454
33 # real QA test starts here
34 export PCP_PMCDCONF_PATH
=$tmp.conf
36 export PMCD_SOCKET
=$tmp.pmcd.socket
40 cat <<End-of-File >$tmp.conf
41 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
43 allow user nosuchuser ;
44 allow user $username : ;
45 allow user $username : fetch, ;
46 allow user $username : fetch, maximum 7 connections, store, maximum 3 connections;
47 allow user $username : fetch, maximum foo connections;
51 cat <<End-of-File >$tmp.conf
52 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
54 allow user $username : store
58 cat <<End-of-File >$tmp.conf
59 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
61 allow user $username, nosuchuser
67 cat <<End-of-File >$tmp.conf
68 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
70 allow group nosuchgroup ;
71 allow group $groupname : ;
72 allow group $groupname : fetch, ;
73 allow group $groupname : fetch, maximum 7 connections, store, maximum 3 connections;
74 allow group $groupname : fetch, maximum foo connections;
78 cat <<End-of-File >$tmp.conf
79 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
81 allow group $groupname : store
85 cat <<End-of-File >$tmp.conf
86 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
88 allow group $groupname, nosuchgroup