summaryrefslogtreecommitdiff
path: root/pcr/firejail/firejail.install
blob: f3916469290519050778c863d70477cffc8a947f (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
pre_upgrade() {
echo "Checking 26 firejail profiles for user modification, backing up as needed..."
	FilesToCheck=(
'/etc/firejail/audacious.profile'
'/etc/firejail/clementine.profile'
'/etc/firejail/deadbeef.profile'
'/etc/firejail/deluge.profile'
'/etc/firejail/disable-common.inc'
'/etc/firejail/disable-history.inc'
'/etc/firejail/disable-mgmt.inc'
'/etc/firejail/disable-secret.inc'
'/etc/firejail/empathy.profile'
'/etc/firejail/evince.profile'
'/etc/firejail/fbreader.profile'
'/etc/firejail/filezilla.profile'
'/etc/firejail/firefox.profile'
'/etc/firejail/generic.profile'
'/etc/firejail/gnome-mplayer.profile'
'/etc/firejail/icecat.profile'
'/etc/firejail/icedove.profile'
'/etc/firejail/iceweasel.profile'
'/etc/firejail/login.users'
'/etc/firejail/midori.profile'
'/etc/firejail/pidgin.profile'
'/etc/firejail/qbittorrent.profile'
'/etc/firejail/quassel.profile'
'/etc/firejail/rhythmbox.profile'
'/etc/firejail/server.profile'
'/etc/firejail/thunderbird.profile'
'/etc/firejail/totem.profile'
'/etc/firejail/transmission-gtk.profile'
'/etc/firejail/transmission-qt.profile'
'/etc/firejail/vlc.profile'
'/etc/firejail/xchat.profile')

OriginalFileHashes=(
'fcd9b1c17f7c67e28c3d7d9baef5e04d1fa3c1e652cb7377ff955c56a7434a51b13d2ed86fdf1365eaed595cfa9a7ee5983d240f16f34db43e830ea976160f36'
'96217eab44531f9a4d5f062d0a3d5e55e413df5e55e7b617ff1b42b66830663b72a4356752cac0966bd38075891a7be518fe7b83fe8d2b6f309006112aed8684'
'b20818d85f450f367f8e97cf3fc62848aa9365fc73dc63098a0d671120149425889ab14ad938664a2ea18dfe0f836e182af2c1333eab352a0adfb93c94c09798'
'ebea3e357bd9c0174aaa8c0a52f2ef2458c96dd60072c654181425243ffcb929f81b1931bb2ab7896eb55fa90c28d1aacaf90f662c5b63a90509e2262631ec02'
'71ad60139c7a7f3b987c8d472cef293996126c13c04a358bad29ba4f8d02d60050862acf881bb8448943c1170001dd1dcc611006d38b9ec50e1e04ac98602aff'
'2e412845bf7db285aef97b8c48b73a6fb59377ba21cbd5ac51650a5acb57eae6658ff149516c73e477012e89067fb81c5585ad4e7b430d424f020118cd5b6824'
'c36cb56d0ca440307fea86ed41d697603f48a0273dd313aad3ddc5886a31f43425c24546cda6227b55d11ab2f46352b3f2591239d08694f2442e4b30525ac3b9'
'422626df14c9669f5f36e7092467d0a9ca4b1bf90d7227416481c5f979283f038144acbae28cfb1c60b2c0887191771c9f9beb0d0663f8542e51061198aff052'
'deb91a0f2a00209997e5bd66bd3a34bd77eb722ac3750fcc2c4779a0ae224a35e99800f9a7f0d31b41f01e7c797da8556e84404f6a7285606f336be21eb590d7'
'b8880a5c9ad0f608ba76587b72b56326a331f1bae5520b9b663ed2c6ba62a36bf122155520fd1018c8bb84618843a9a02ae8d14e2c9aa128b58685136fe53e31'
'52b7d856f826988f610524b9432252f36d4202fddab14476f06c2a0d6ce1c5109a66a329d6ae16bd00c9bbf81cd33c4c3dcd9c708a84adc5c986f5612d14a1b2'
'd09a25dab801bbde8aa5d3a5fc24586dddd460a687da49037cd14902dcd572eb7b1dec2c2cb6921047891294ff4bd0dc882de7aa64db10b15c7f44133e03e9f9'
'e0a5824a53d2464955d47760bedbebfd6ca93e3618ed9f2e2434dcefebd357a98362e600bf4507012b1e6ab343609bad52372c90b3162eb9d85637d433c19b83'
'84ba92338aa5ca8c01be84a274fcb71f8fa4bb950b938f6b9fd32297ded2739f6aef4733e6cb787dc366a9a7f04119767d48e56d86f0d2fcb10c28bf58faf86b'
'39a736617d8663a4cbd865ba5bb2c4f3896a2f969b637a62fb3f4da2a18c6d7611a93add84bc02174aaa96e7c2412d36a5485b2d444a0cc51e6320212ec4418d'
'81db63b03b1f950b1e7810fab38ce4fe5776f11e3036848da6298d9002b5c4683028d4fdd630db118d428fd91e5118872b5b2ccff9c82d02a966765efdb9dc17'
'9a8c4d7ce893340da2d9cc8237cecf8bca2865e5552747c480a1f803072960b7aa571b2693600076ea8800b86e1d0945d8a535fffcdbe9569b3820a477b155d2'
'8ded98eec8c11af8defef583227ea833beca534e5f2be48b52ec75152afddf14d78ba47442237e84eda8bb1b8361b1afecd63576f8ef6b18d50fb8c6559e8638'
'672fa8b25ed28a07efb41fad6415c9fa96ce4bf4f4a1a6412595afb309ef6c1e67033ee256f997c32e9abe25bd6a100160ff12f2235c9be289c223547d03ca95'
'ccd607fc22ea583fcd2e69a9d3524bf6e3c7839464d17cac6d26be1917a5d1b2bbc7623930af4e3faa3ccf890caa86a4940271958f206e2f1b66a0af4b49b3ee'
'9e100bb2f51d5ef8d04325a83e80c54fbcd85a082c35d3f5aa7eabc79028cfd90d3a1537768e5b7f93468d2ddbbf15ca421784820ceb6d718915e5a5fe584c6c'
'9f5990e680f85343615fe26f032b8ffcff9cc34772fc546b66d728788a097c91751c91cf56c27c678226a1737c59d1da95970ca88ee58477bdb3d9263336ce28'
'96d1dd388e08ed702e4a7580dad5f759b9d969dc12cc9a1f50431d7a73302b4c1ce1cde5855ae045d3aaba81b733edd7120066ce298c12822706344e590f11e2'
'03393bb3fa555ee9d402770faaece0ec8c974631995d0ea08548a6d849d2c8f09d7df10b1350dae1449cfd6df37cf4013d715cdd2bca865878d8c135f73737d6'
'0fa8393eaa3c0e5514e44e42ed9f8085c2aa8ddfa799e4cdd19d1004c81692dc1baa8963aa75dfbb7e268c80636711a90110f365e2f3d0769d7fdf0b6aaac65e'
'ca60021399e8b1a0e7c3a121a3e77eaaa8063e52e152a32a9c4cb350019c24f1d14adabd6d69259dc8aa206e4ecae3a303237cf4ba02260a21419012f9b9d7eb'
'53902e78dd36bc7b106ee45c9937340651579976ae129882155df3714910f93ed04b76277fe1c777deabede779b41b3d5feb9f222c4109dfa611e3a11900a58d'
'660943c1f153e0cb81aa1c1f424f40c68662ae8123acb3592ab8fbd7003dbfa189352c972e78f33c23e8ae239a65a41cd4f6b46798b130860deab832fbe06247'
'446b8b45a66f0373ad333987f453b6fe02e6c78c9055eec525f17b6990940d645c6e69071836f3483afbb8d9ec00754ad05223a474c05d981a3334c940f2ae02'
'd6a8e3472a2c7f6877c2237745b4bda3aaa4af83b5d60a04d678bb06258ac318790a14140abd0ad4c8525dd15024b695f631fcb827cff1370f06335cbcd938de'
'2a473ef99793552a2f25cfe7acdac3af28575dd734a9d38699ca29cd68857b2121db1af1d582f03c10286c2e441708db7012db33fec84ef3a5c2936418665380')

## Uses above arrays to check if file's original hash matches, if not the file was edited, so we save a backup and notify the user.

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[0]} | awk '{print $1}')" = ${OriginalFileHashes[0]} ]] || { cat "${FilesToCheck[0]}" > "${FilesToCheck[0]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[0]}.pacsave"; } 

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[1]} | awk '{print $1}')" = ${OriginalFileHashes[1]} ]] || { cat "${FilesToCheck[1]}" > "${FilesToCheck[1]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[1]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[2]} | awk '{print $1}')" = ${OriginalFileHashes[2]} ]] || { cat "${FilesToCheck[2]}" > "${FilesToCheck[2]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[2]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[3]} | awk '{print $1}')" = ${OriginalFileHashes[3]} ]] || { cat "${FilesToCheck[3]}" > "${FilesToCheck[3]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[3]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[4]} | awk '{print $1}')" = ${OriginalFileHashes[4]} ]] || { cat "${FilesToCheck[4]}" > "${FilesToCheck[4]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[4]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[5]} | awk '{print $1}')" = ${OriginalFileHashes[5]} ]] || { cat "${FilesToCheck[5]}" > "${FilesToCheck[5]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[5]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[6]} | awk '{print $1}')" = ${OriginalFileHashes[6]} ]] || { cat "${FilesToCheck[6]}" > "${FilesToCheck[6]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[6]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[7]} | awk '{print $1}')" = ${OriginalFileHashes[7]} ]] || { cat "${FilesToCheck[7]}" > "${FilesToCheck[7]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[7]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[8]} | awk '{print $1}')" = ${OriginalFileHashes[8]} ]] || { cat "${FilesToCheck[8]}" > "${FilesToCheck[8]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[8]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[9]} | awk '{print $1}')" = ${OriginalFileHashes[9]} ]] || { cat "${FilesToCheck[9]}" > "${FilesToCheck[9]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[9]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[10]} | awk '{print $1}')" = ${OriginalFileHashes[10]} ]] || { cat "${FilesToCheck[10]}" > "${FilesToCheck[10]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[10]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[11]} | awk '{print $1}')" = ${OriginalFileHashes[11]} ]] || { cat "${FilesToCheck[11]}" > "${FilesToCheck[11]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[11]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[12]} | awk '{print $1}')" = ${OriginalFileHashes[12]} ]] || { cat "${FilesToCheck[12]}" > "${FilesToCheck[12]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[12]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[13]} | awk '{print $1}')" = ${OriginalFileHashes[13]} ]] || { cat "${FilesToCheck[13]}" > "${FilesToCheck[13]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[13]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[14]} | awk '{print $1}')" = ${OriginalFileHashes[14]} ]] || { cat "${FilesToCheck[14]}" > "${FilesToCheck[14]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[14]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[15]} | awk '{print $1}')" = ${OriginalFileHashes[15]} ]] || { cat "${FilesToCheck[15]}" > "${FilesToCheck[15]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[15]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[16]} | awk '{print $1}')" = ${OriginalFileHashes[16]} ]] || { cat "${FilesToCheck[16]}" > "${FilesToCheck[16]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[16]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[17]} | awk '{print $1}')" = ${OriginalFileHashes[17]} ]] || { cat "${FilesToCheck[17]}" > "${FilesToCheck[17]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[17]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[18]} | awk '{print $1}')" = ${OriginalFileHashes[18]} ]] || { cat "${FilesToCheck[18]}" > "${FilesToCheck[18]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[18]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[19]} | awk '{print $1}')" = ${OriginalFileHashes[19]} ]] || { cat "${FilesToCheck[19]}" > "${FilesToCheck[19]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[19]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[20]} | awk '{print $1}')" = ${OriginalFileHashes[20]} ]] || { cat "${FilesToCheck[20]}" > "${FilesToCheck[20]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[20]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[21]} | awk '{print $1}')" = ${OriginalFileHashes[21]} ]] || { cat "${FilesToCheck[21]}" > "${FilesToCheck[21]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[21]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[22]} | awk '{print $1}')" = ${OriginalFileHashes[22]} ]] || { cat "${FilesToCheck[22]}" > "${FilesToCheck[22]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[22]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[23]} | awk '{print $1}')" = ${OriginalFileHashes[23]} ]] || { cat "${FilesToCheck[23]}" > "${FilesToCheck[23]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[23]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[24]} | awk '{print $1}')" = ${OriginalFileHashes[24]} ]] || { cat "${FilesToCheck[24]}" > "${FilesToCheck[24]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[24]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[25]} | awk '{print $1}')" = ${OriginalFileHashes[25]} ]] || { cat "${FilesToCheck[25]}" > "${FilesToCheck[25]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[25]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[26]} | awk '{print $1}')" = ${OriginalFileHashes[26]} ]] || { cat "${FilesToCheck[26]}" > "${FilesToCheck[26]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[26]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[27]} | awk '{print $1}')" = ${OriginalFileHashes[27]} ]] || { cat "${FilesToCheck[27]}" > "${FilesToCheck[27]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[27]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[28]} | awk '{print $1}')" = ${OriginalFileHashes[28]} ]] || { cat "${FilesToCheck[28]}" > "${FilesToCheck[28]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[28]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[29]} | awk '{print $1}')" = ${OriginalFileHashes[29]} ]] || { cat "${FilesToCheck[29]}" > "${FilesToCheck[29]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[29]}.pacsave"; }

[[ "$(openssl dgst -r -whirlpool ${FilesToCheck[30]} | awk '{print $1}')" = ${OriginalFileHashes[30]} ]] || { cat "${FilesToCheck[30]}" > "${FilesToCheck[30]}.pacsave" ;  echo "Backup saved: ${FilesToCheck[30]}.pacsave"; }

echo "Done!"

}