File: test-security-no-remote-status

package info (click to toggle)
apt 3.1.13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,764 kB
  • sloc: cpp: 71,085; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (30 lines) | stat: -rwxr-xr-x 751 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
#
# Test that packages from remote sources cannot set the Status field.
#
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'

TMPDIR=$(readlink -f .)

insertpackage 'unstable' 'pretends-installed' 'all' '1' 'Status: install ok installed'
insertinstalledpackage 'really-installed' 'all' '1'
setupaptarchive

testequal "pretends-installed:
  Installed: (none)
  Candidate: 1
  Version table:
     1 500
        500 file:${TMPDIR}/aptarchive unstable/main all Packages" aptcache policy pretends-installed

testequal "really-installed:
  Installed: 1
  Candidate: 1
  Version table:
 *** 1 100
        100 ${TMPDIR}/rootdir/var/lib/dpkg/status" aptcache policy really-installed