summaryrefslogtreecommitdiff
path: root/src/libimcv/plugins/imv_attestation/build-database.sh
blob: ca2939b49bc13565ef1ee2d902458bf2941f0a7c (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh

p="Ubuntu 14.04 x86_64"
a="x86_64-linux-gnu"
k="3.13.0-37-generic"

for hash in sha1 sha256
do
  ipsec attest --add --product "$p" --$hash --dir  /sbin
  ipsec attest --add --product "$p" --$hash --dir  /usr/sbin
  ipsec attest --add --product "$p" --$hash --dir  /bin
  ipsec attest --add --product "$p" --$hash --dir  /usr/bin

  ipsec attest --add --product "$p" --$hash --file /etc/init.d/rc
  ipsec attest --add --product "$p" --$hash --file /etc/init.d/rcS
  ipsec attest --add --product "$p" --$hash --dir  /etc/network/if-pre-up.d
  ipsec attest --add --product "$p" --$hash --dir  /etc/network/if-up.d
  ipsec attest --add --product "$p" --$hash --dir  /etc/ppp/ip-down.d
  ipsec attest --add --product "$p" --$hash --dir  /etc/rcS.d
  ipsec attest --add --product "$p" --$hash --dir  /etc/rc2.d
  ipsec attest --add --product "$p" --$hash --file /etc/rc.local
  ipsec attest --add --product "$p" --$hash --dir  /etc/resolvconf/update.d
  ipsec attest --add --product "$p" --$hash --file /etc/resolvconf/update-libc.d/avahi-daemon
  ipsec attest --add --product "$p" --$hash --dir  /etc/update-motd.d

  ipsec attest --add --product "$p" --$hash --dir  /lib
  ipsec attest --add --product "$p" --$hash --file /lib/crda/setregdomain
  ipsec attest --add --product "$p" --$hash --dir  /lib/ebtables
  ipsec attest --add --product "$p" --$hash --file /lib/init/apparmor-profile-load
  ipsec attest --add --product "$p" --$hash --file /lib/resolvconf/list-records
  ipsec attest --add --product "$p" --$hash --dir  /lib/ufw
  ipsec attest --add --product "$p" --$hash --dir  /lib/udev
  ipsec attest --add --product "$p" --$hash --dir  /lib/systemd
  ipsec attest --add --product "$p" --$hash --dir  /lib/xtables
  ipsec attest --add --product "$p" --$hash --dir  /lib/$a
  ipsec attest --add --product "$p" --$hash --dir  /lib/$a/plymouth
  ipsec attest --add --product "$p" --$hash --dir  /lib/$a/plymouth/renderers
  ipsec attest --add --product "$p" --$hash --dir  /lib/$a/security

  ipsec attest --add --product "$p" --$hash --file /lib64/ld-linux-x86-64.so.2

  for file in `find /usr/lib -name *.so`
  do
    ipsec attest --add --product "$p" --$hash --file $file
  done

  for file in `find /usr/lib -name *service`
  do
    ipsec attest --add --product "$p" --$hash --file $file
  done

  ipsec attest --add --product "$p" --$hash --dir  /usr/lib
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/accountsservice
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/at-spi2-core
  ipsec attest --add --product "$p" --$hash --file /usr/lib/avahi/avahi-daemon-check-dns.sh
  ipsec attest --add --product "$p" --$hash --file /usr/lib/dbus-1.0/dbus-daemon-launch-helper
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/gvfs
  ipsec attest --add --product "$p" --$hash --file /usr/lib/firefox/firefox
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/NetworkManager
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/pm-utils/power.d
  ipsec attest --add --product "$p" --$hash --file /usr/lib/policykit-1/polkitd
  ipsec attest --add --product "$p" --$hash --file /usr/lib/thunderbird/thunderbird
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/ubuntu-release-upgrader
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/update-notifier

  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/$a
  ipsec attest --add --product "$p" --$hash --file /usr/lib/$a/mesa/libGL.so.1.2.0
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/$a/samba
  ipsec attest --add --product "$p" --$hash --dir  /usr/lib/$a/sasl2

  ipsec attest --add --product "$p" --$hash --dir  /usr/share/language-tools

  ipsec attest --add --product "$p" --$hash --file /init \
                     --measdir /usr/share/initramfs-tools

  ipsec attest --add --product "$p" --$hash --file /scripts/functions \
                     --measdir /usr/share/initramfs-tools/scripts

  for file in `find /lib/modules/$k -name *.ko`
  do
    ipsec attest --add --product "$p" --$hash --file $file
  done
done