File: 720

package info (click to toggle)
pcp 7.0.5-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,916 kB
  • sloc: ansic: 1,478,844; sh: 177,285; xml: 160,462; cpp: 83,809; python: 24,349; perl: 18,303; yacc: 6,877; lex: 2,864; makefile: 2,694; awk: 165; fortran: 60; java: 52
file content (61 lines) | stat: -rwxr-xr-x 2,400 bytes parent folder | download
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
#!/bin/sh
# PCP QA Test No. 720
# Exercise the pmParseHostAttrsSpec API family

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

_check_valgrind

status=0	# success is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

_run_valgrind src/parsehostattrs pcps://nas1.servers.com:44321,4321@firewall.servers.com:44322?compress
_run_valgrind src/parsehostattrs pcp://localhost:23?compress
_run_valgrind src/parsehostattrs pcp://some.host?user=pcpqa\&compress\&pass=blah
_run_valgrind src/parsehostattrs pcp://some.host?user=pcpqa
_run_valgrind src/parsehostattrs some.host?user=pcpqa
_run_valgrind src/parsehostattrs some.host
_run_valgrind src/parsehostattrs pcp://?compress\&exclusive

_filter_auth()
{
    # filter all the wierd and wonderful ways that SASL and its merry modules
    # might fail, into one canonical form ("authentication failure").
    #
    # Noise ...
    # [Fri Feb 13 23:00:29] pminfo(9819) Alert: GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Credentials cache file '/tmp/krb5cc_1000' not found)
    # [Fri Mar  6 19:14:35] pminfo(20207) Alert: No worthy mechs found
    #
    # equivalence ...
    # pminfo: ...notApassword": Authentication - generic failure
    # and
    # Error: Authentication - user not found
    # and
    # pminfo: ...notApassword": Authentication - authentication failure
    # and
    # pminfo: ...notApassword": Operation not supported
    # are considered equivalent to
    # Error: Authentication - authentication failure
    #
    tee -a $seq_full | \
    sed \
	-e '/pminfo.* GSSAPI Error:/d' \
	-e '/pminfo.* No worthy mechs found/d' \
	-e 's/^pminfo: .*Authentication -/Error: Authentication -/g' \
	-e 's/^pminfo: .*Operation/Error: Authentication -/g' \
	-e '/Error: Authentication/s/ - generic failure/ - authentication failure/g' \
	-e '/Error: Authentication/s/ - no mechanism available/ - authentication failure/g' \
	-e '/Error: Authentication/s/ - user not found/ - authentication failure/g' \
	-e '/Error: Authentication/s/ - not supported/ - authentication failure/g' \
	-e '/indirectly lost:/d' \
    # end
}

echo "pminfo username/password failure valgrind checking" >> $seq_full
_run_valgrind pminfo -h pcp://localhost?user=NOsuchUSER\&pass=DEFINITELYnotApassword 2>&1 | _filter_auth