File: pam_duo-0.t

package info (click to toggle)
duo-unix 1.11.3-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,892 kB
  • sloc: sh: 12,108; ansic: 9,223; python: 1,639; makefile: 156
file content (34 lines) | stat: -rw-r--r-- 1,109 bytes parent folder | download | duplicates (5)
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

Basic help output

  $ ${TESTDIR}/testpam.py -h
  Usage: */tests/testpam.py [-d] [-c config] [-f user] [-h host] (glob)
  [1]

Missing conf file

  $ ${TESTDIR}/testpam.py -d -c /nonexistent true
  [3] Couldn't open /nonexistent: No such file or directory

Bad permissions on conf file

  $ ${TESTDIR}/../autotools/install-sh -c -m 644 ${TESTDIR}/confs/duo.conf ${TMPDIR}
  $ ${TESTDIR}/testpam.py -d -c ${TMPDIR}/duo.conf true
  */duo.conf must be readable only by user '*' (glob)

Ensure perms on conf files

  $ chmod 600 ${TESTDIR}/confs/*.conf

Bad configuration files

  $ for config in ${TESTDIR}/confs/bad-*.conf; do echo '==>' `basename $config` && ${TESTDIR}/testpam.py -d -c $config true; done
  ==> bad-corrupt.conf
  [3] Parse error in */tests/confs/bad-corrupt.conf, line 5 (glob)
  ==> bad-empty.conf
  [3] Missing host, ikey, or skey in */tests/confs/bad-empty.conf (glob)
  ==> bad-header_only.conf
  [3] Missing host, ikey, or skey in */tests/confs/bad-header_only.conf (glob)
  ==> bad-missing_values.conf
  [3] Missing host, ikey, or skey in */tests/confs/bad-missing_values.conf (glob)